//===----------------------------------------------------------------------===//
//
// This source file is part of the Soto for AWS open source project
//
// Copyright (c) 2017-2022 the Soto project authors
// Licensed under Apache License v2.0
//
// See LICENSE.txt for license information
// See CONTRIBUTORS.txt for the list of Soto project authors
//
// SPDX-License-Identifier: Apache-2.0
//
//===----------------------------------------------------------------------===//

// THIS FILE IS AUTOMATICALLY GENERATED by https://github.com/soto-project/soto-codegenerator.
// DO NOT EDIT.

import Foundation
import SotoCore

extension Comprehend {
    // MARK: Enums

    public enum AugmentedManifestsDocumentTypeFormat: String, CustomStringConvertible, Codable, _SotoSendable {
        case plainTextDocument = "PLAIN_TEXT_DOCUMENT"
        case semiStructuredDocument = "SEMI_STRUCTURED_DOCUMENT"
        public var description: String { return self.rawValue }
    }

    public enum BlockType: String, CustomStringConvertible, Codable, _SotoSendable {
        case line = "LINE"
        case word = "WORD"
        public var description: String { return self.rawValue }
    }

    public enum DocumentClassifierDataFormat: String, CustomStringConvertible, Codable, _SotoSendable {
        case augmentedManifest = "AUGMENTED_MANIFEST"
        case comprehendCsv = "COMPREHEND_CSV"
        public var description: String { return self.rawValue }
    }

    public enum DocumentClassifierMode: String, CustomStringConvertible, Codable, _SotoSendable {
        case multiClass = "MULTI_CLASS"
        case multiLabel = "MULTI_LABEL"
        public var description: String { return self.rawValue }
    }

    public enum DocumentReadAction: String, CustomStringConvertible, Codable, _SotoSendable {
        case textractAnalyzeDocument = "TEXTRACT_ANALYZE_DOCUMENT"
        case textractDetectDocumentText = "TEXTRACT_DETECT_DOCUMENT_TEXT"
        public var description: String { return self.rawValue }
    }

    public enum DocumentReadFeatureTypes: String, CustomStringConvertible, Codable, _SotoSendable {
        case forms = "FORMS"
        case tables = "TABLES"
        public var description: String { return self.rawValue }
    }

    public enum DocumentReadMode: String, CustomStringConvertible, Codable, _SotoSendable {
        case forceDocumentReadAction = "FORCE_DOCUMENT_READ_ACTION"
        case serviceDefault = "SERVICE_DEFAULT"
        public var description: String { return self.rawValue }
    }

    public enum DocumentType: String, CustomStringConvertible, Codable, _SotoSendable {
        case image = "IMAGE"
        case msWord = "MS_WORD"
        case nativePdf = "NATIVE_PDF"
        case plainText = "PLAIN_TEXT"
        case scannedPdf = "SCANNED_PDF"
        case textractAnalyzeDocumentJson = "TEXTRACT_ANALYZE_DOCUMENT_JSON"
        case textractDetectDocumentTextJson = "TEXTRACT_DETECT_DOCUMENT_TEXT_JSON"
        public var description: String { return self.rawValue }
    }

    public enum EndpointStatus: String, CustomStringConvertible, Codable, _SotoSendable {
        case creating = "CREATING"
        case deleting = "DELETING"
        case failed = "FAILED"
        case inService = "IN_SERVICE"
        case updating = "UPDATING"
        public var description: String { return self.rawValue }
    }

    public enum EntityRecognizerDataFormat: String, CustomStringConvertible, Codable, _SotoSendable {
        case augmentedManifest = "AUGMENTED_MANIFEST"
        case comprehendCsv = "COMPREHEND_CSV"
        public var description: String { return self.rawValue }
    }

    public enum EntityType: String, CustomStringConvertible, Codable, _SotoSendable {
        case commercialItem = "COMMERCIAL_ITEM"
        case date = "DATE"
        case event = "EVENT"
        case location = "LOCATION"
        case organization = "ORGANIZATION"
        case other = "OTHER"
        case person = "PERSON"
        case quantity = "QUANTITY"
        case title = "TITLE"
        public var description: String { return self.rawValue }
    }

    public enum InputFormat: String, CustomStringConvertible, Codable, _SotoSendable {
        case oneDocPerFile = "ONE_DOC_PER_FILE"
        case oneDocPerLine = "ONE_DOC_PER_LINE"
        public var description: String { return self.rawValue }
    }

    public enum JobStatus: String, CustomStringConvertible, Codable, _SotoSendable {
        case completed = "COMPLETED"
        case failed = "FAILED"
        case inProgress = "IN_PROGRESS"
        case stopRequested = "STOP_REQUESTED"
        case stopped = "STOPPED"
        case submitted = "SUBMITTED"
        public var description: String { return self.rawValue }
    }

    public enum LanguageCode: String, CustomStringConvertible, Codable, _SotoSendable {
        case ar
        case de
        case en
        case es
        case fr
        case hi
        case it
        case ja
        case ko
        case pt
        case zh
        case zhTw = "zh-TW"
        public var description: String { return self.rawValue }
    }

    public enum ModelStatus: String, CustomStringConvertible, Codable, _SotoSendable {
        case deleting = "DELETING"
        case inError = "IN_ERROR"
        case stopRequested = "STOP_REQUESTED"
        case stopped = "STOPPED"
        case submitted = "SUBMITTED"
        case trained = "TRAINED"
        case training = "TRAINING"
        public var description: String { return self.rawValue }
    }

    public enum PageBasedErrorCode: String, CustomStringConvertible, Codable, _SotoSendable {
        case internalServerError = "INTERNAL_SERVER_ERROR"
        case pageCharactersExceeded = "PAGE_CHARACTERS_EXCEEDED"
        case pageSizeExceeded = "PAGE_SIZE_EXCEEDED"
        case textractBadPage = "TEXTRACT_BAD_PAGE"
        case textractProvisionedThroughputExceeded = "TEXTRACT_PROVISIONED_THROUGHPUT_EXCEEDED"
        public var description: String { return self.rawValue }
    }

    public enum PartOfSpeechTagType: String, CustomStringConvertible, Codable, _SotoSendable {
        case adj = "ADJ"
        case adp = "ADP"
        case adv = "ADV"
        case aux = "AUX"
        case cconj = "CCONJ"
        case conj = "CONJ"
        case det = "DET"
        case intj = "INTJ"
        case noun = "NOUN"
        case num = "NUM"
        case o = "O"
        case part = "PART"
        case pron = "PRON"
        case propn = "PROPN"
        case punct = "PUNCT"
        case sconj = "SCONJ"
        case sym = "SYM"
        case verb = "VERB"
        public var description: String { return self.rawValue }
    }

    public enum PiiEntitiesDetectionMaskMode: String, CustomStringConvertible, Codable, _SotoSendable {
        case mask = "MASK"
        case replaceWithPiiEntityType = "REPLACE_WITH_PII_ENTITY_TYPE"
        public var description: String { return self.rawValue }
    }

    public enum PiiEntitiesDetectionMode: String, CustomStringConvertible, Codable, _SotoSendable {
        case onlyOffsets = "ONLY_OFFSETS"
        case onlyRedaction = "ONLY_REDACTION"
        public var description: String { return self.rawValue }
    }

    public enum PiiEntityType: String, CustomStringConvertible, Codable, _SotoSendable {
        case address = "ADDRESS"
        case age = "AGE"
        case all = "ALL"
        case awsAccessKey = "AWS_ACCESS_KEY"
        case awsSecretKey = "AWS_SECRET_KEY"
        case bankAccountNumber = "BANK_ACCOUNT_NUMBER"
        case bankRouting = "BANK_ROUTING"
        case caHealthNumber = "CA_HEALTH_NUMBER"
        case caSocialInsuranceNumber = "CA_SOCIAL_INSURANCE_NUMBER"
        case creditDebitCvv = "CREDIT_DEBIT_CVV"
        case creditDebitExpiry = "CREDIT_DEBIT_EXPIRY"
        case creditDebitNumber = "CREDIT_DEBIT_NUMBER"
        case dateTime = "DATE_TIME"
        case driverId = "DRIVER_ID"
        case email = "EMAIL"
        case inAadhaar = "IN_AADHAAR"
        case inNrega = "IN_NREGA"
        case inPermanentAccountNumber = "IN_PERMANENT_ACCOUNT_NUMBER"
        case inVoterNumber = "IN_VOTER_NUMBER"
        case internationalBankAccountNumber = "INTERNATIONAL_BANK_ACCOUNT_NUMBER"
        case ipAddress = "IP_ADDRESS"
        case licensePlate = "LICENSE_PLATE"
        case macAddress = "MAC_ADDRESS"
        case name = "NAME"
        case passportNumber = "PASSPORT_NUMBER"
        case password = "PASSWORD"
        case phone = "PHONE"
        case pin = "PIN"
        case ssn = "SSN"
        case swiftCode = "SWIFT_CODE"
        case ukNationalHealthServiceNumber = "UK_NATIONAL_HEALTH_SERVICE_NUMBER"
        case ukNationalInsuranceNumber = "UK_NATIONAL_INSURANCE_NUMBER"
        case ukUniqueTaxpayerReferenceNumber = "UK_UNIQUE_TAXPAYER_REFERENCE_NUMBER"
        case url = "URL"
        case usIndividualTaxIdentificationNumber = "US_INDIVIDUAL_TAX_IDENTIFICATION_NUMBER"
        case username = "USERNAME"
        case vehicleIdentificationNumber = "VEHICLE_IDENTIFICATION_NUMBER"
        public var description: String { return self.rawValue }
    }

    public enum RelationshipType: String, CustomStringConvertible, Codable, _SotoSendable {
        case child = "CHILD"
        public var description: String { return self.rawValue }
    }

    public enum SentimentType: String, CustomStringConvertible, Codable, _SotoSendable {
        case mixed = "MIXED"
        case negative = "NEGATIVE"
        case neutral = "NEUTRAL"
        case positive = "POSITIVE"
        public var description: String { return self.rawValue }
    }

    public enum Split: String, CustomStringConvertible, Codable, _SotoSendable {
        case test = "TEST"
        case train = "TRAIN"
        public var description: String { return self.rawValue }
    }

    public enum SyntaxLanguageCode: String, CustomStringConvertible, Codable, _SotoSendable {
        case de
        case en
        case es
        case fr
        case it
        case pt
        public var description: String { return self.rawValue }
    }

    public enum TargetedSentimentEntityType: String, CustomStringConvertible, Codable, _SotoSendable {
        case attribute = "ATTRIBUTE"
        case book = "BOOK"
        case brand = "BRAND"
        case commercialItem = "COMMERCIAL_ITEM"
        case date = "DATE"
        case event = "EVENT"
        case facility = "FACILITY"
        case game = "GAME"
        case location = "LOCATION"
        case movie = "MOVIE"
        case music = "MUSIC"
        case organization = "ORGANIZATION"
        case other = "OTHER"
        case person = "PERSON"
        case personalTitle = "PERSONAL_TITLE"
        case quantity = "QUANTITY"
        case software = "SOFTWARE"
        public var description: String { return self.rawValue }
    }

    // MARK: Shapes

    public struct AugmentedManifestsListItem: AWSEncodableShape & AWSDecodableShape {
        /// The S3 prefix to the annotation files that are referred in the augmented manifest file.
        public let annotationDataS3Uri: String?
        /// The JSON attribute that contains the annotations for your training documents. The number of attribute names that you specify depends on whether your augmented manifest file is the output of a single labeling job or a chained labeling job. If your file is the output of a single labeling job, specify the LabelAttributeName key that was used when the job was created in Ground Truth. If your file is the output of a chained labeling job, specify the LabelAttributeName key for one or more jobs in the chain. Each LabelAttributeName key provides the annotations from an individual job.
        public let attributeNames: [String]
        /// The type of augmented manifest. PlainTextDocument or SemiStructuredDocument. If you don't specify, the default is PlainTextDocument.     PLAIN_TEXT_DOCUMENT A document type that represents any unicode text that is encoded in UTF-8.    SEMI_STRUCTURED_DOCUMENT A document type with positional and structural context, like a PDF. For training with Amazon Comprehend, only PDFs are supported. For inference, Amazon Comprehend support PDFs, DOCX and TXT.
        public let documentType: AugmentedManifestsDocumentTypeFormat?
        /// The Amazon S3 location of the augmented manifest file.
        public let s3Uri: String
        /// The S3 prefix to the source files (PDFs) that are referred to in the augmented manifest file.
        public let sourceDocumentsS3Uri: String?
        /// The purpose of the data you've provided in the augmented manifest. You can either train or test this data. If you don't specify, the default is train. TRAIN - all of the documents in the manifest will be used for training. If no test documents are provided, Amazon Comprehend will automatically reserve a portion of the training documents for testing. TEST - all of the documents in the manifest will be used for testing.
        public let split: Split?

        public init(annotationDataS3Uri: String? = nil, attributeNames: [String], documentType: AugmentedManifestsDocumentTypeFormat? = nil, s3Uri: String, sourceDocumentsS3Uri: String? = nil, split: Split? = nil) {
            self.annotationDataS3Uri = annotationDataS3Uri
            self.attributeNames = attributeNames
            self.documentType = documentType
            self.s3Uri = s3Uri
            self.sourceDocumentsS3Uri = sourceDocumentsS3Uri
            self.split = split
        }

        public func validate(name: String) throws {
            try self.validate(self.annotationDataS3Uri, name: "annotationDataS3Uri", parent: name, max: 1024)
            try self.validate(self.annotationDataS3Uri, name: "annotationDataS3Uri", parent: name, pattern: "^s3://[a-z0-9][\\.\\-a-z0-9]{1,61}[a-z0-9](/.*)?$")
            try self.attributeNames.forEach {
                try validate($0, name: "attributeNames[]", parent: name, max: 63)
                try validate($0, name: "attributeNames[]", parent: name, min: 1)
                try validate($0, name: "attributeNames[]", parent: name, pattern: "^[a-zA-Z0-9](-*[a-zA-Z0-9])*$")
            }
            try self.validate(self.s3Uri, name: "s3Uri", parent: name, max: 1024)
            try self.validate(self.s3Uri, name: "s3Uri", parent: name, pattern: "^s3://[a-z0-9][\\.\\-a-z0-9]{1,61}[a-z0-9](/.*)?$")
            try self.validate(self.sourceDocumentsS3Uri, name: "sourceDocumentsS3Uri", parent: name, max: 1024)
            try self.validate(self.sourceDocumentsS3Uri, name: "sourceDocumentsS3Uri", parent: name, pattern: "^s3://[a-z0-9][\\.\\-a-z0-9]{1,61}[a-z0-9](/.*)?$")
        }

        private enum CodingKeys: String, CodingKey {
            case annotationDataS3Uri = "AnnotationDataS3Uri"
            case attributeNames = "AttributeNames"
            case documentType = "DocumentType"
            case s3Uri = "S3Uri"
            case sourceDocumentsS3Uri = "SourceDocumentsS3Uri"
            case split = "Split"
        }
    }

    public struct BatchDetectDominantLanguageItemResult: AWSDecodableShape {
        /// The zero-based index of the document in the input list.
        public let index: Int?
        /// One or more DominantLanguage objects describing the dominant languages in the document.
        public let languages: [DominantLanguage]?

        public init(index: Int? = nil, languages: [DominantLanguage]? = nil) {
            self.index = index
            self.languages = languages
        }

        private enum CodingKeys: String, CodingKey {
            case index = "Index"
            case languages = "Languages"
        }
    }

    public struct BatchDetectDominantLanguageRequest: AWSEncodableShape {
        /// A list containing the UTF-8 encoded text of the input documents. The list can contain a maximum of 25 documents. Each document should contain at least 20 characters. The maximum size of each document is 5 KB.
        public let textList: [String]

        public init(textList: [String]) {
            self.textList = textList
        }

        public func validate(name: String) throws {
            try self.textList.forEach {
                try validate($0, name: "textList[]", parent: name, min: 1)
            }
            try self.validate(self.textList, name: "textList", parent: name, min: 1)
        }

        private enum CodingKeys: String, CodingKey {
            case textList = "TextList"
        }
    }

    public struct BatchDetectDominantLanguageResponse: AWSDecodableShape {
        /// A list containing one  object for each document that contained an error. The results are sorted in ascending order by the Index field and match the order of the documents in the input list. If there are no errors in the batch, the ErrorList is empty.
        public let errorList: [BatchItemError]
        /// A list of  objects containing the results of the operation. The results are sorted in ascending order by the Index field and match the order of the documents in the input list. If all of the documents contain an error, the ResultList is empty.
        public let resultList: [BatchDetectDominantLanguageItemResult]

        public init(errorList: [BatchItemError], resultList: [BatchDetectDominantLanguageItemResult]) {
            self.errorList = errorList
            self.resultList = resultList
        }

        private enum CodingKeys: String, CodingKey {
            case errorList = "ErrorList"
            case resultList = "ResultList"
        }
    }

    public struct BatchDetectEntitiesItemResult: AWSDecodableShape {
        /// One or more Entity objects, one for each entity detected in the document.
        public let entities: [Entity]?
        /// The zero-based index of the document in the input list.
        public let index: Int?

        public init(entities: [Entity]? = nil, index: Int? = nil) {
            self.entities = entities
            self.index = index
        }

        private enum CodingKeys: String, CodingKey {
            case entities = "Entities"
            case index = "Index"
        }
    }

    public struct BatchDetectEntitiesRequest: AWSEncodableShape {
        /// The language of the input documents. You can specify any of the primary languages supported by Amazon Comprehend. All documents must be in the same language.
        public let languageCode: LanguageCode
        /// A list containing the UTF-8 encoded text of the input documents. The list can contain a maximum of 25 documents. The maximum size of each document is 5 KB.
        public let textList: [String]

        public init(languageCode: LanguageCode, textList: [String]) {
            self.languageCode = languageCode
            self.textList = textList
        }

        public func validate(name: String) throws {
            try self.textList.forEach {
                try validate($0, name: "textList[]", parent: name, min: 1)
            }
            try self.validate(self.textList, name: "textList", parent: name, min: 1)
        }

        private enum CodingKeys: String, CodingKey {
            case languageCode = "LanguageCode"
            case textList = "TextList"
        }
    }

    public struct BatchDetectEntitiesResponse: AWSDecodableShape {
        /// A list containing one  object for each document that contained an error. The results are sorted in ascending order by the Index field and match the order of the documents in the input list. If there are no errors in the batch, the ErrorList is empty.
        public let errorList: [BatchItemError]
        /// A list of  objects containing the results of the operation. The results are sorted in ascending order by the Index field and match the order of the documents in the input list. If all of the documents contain an error, the ResultList is empty.
        public let resultList: [BatchDetectEntitiesItemResult]

        public init(errorList: [BatchItemError], resultList: [BatchDetectEntitiesItemResult]) {
            self.errorList = errorList
            self.resultList = resultList
        }

        private enum CodingKeys: String, CodingKey {
            case errorList = "ErrorList"
            case resultList = "ResultList"
        }
    }

    public struct BatchDetectKeyPhrasesItemResult: AWSDecodableShape {
        /// The zero-based index of the document in the input list.
        public let index: Int?
        /// One or more KeyPhrase objects, one for each key phrase detected in the document.
        public let keyPhrases: [KeyPhrase]?

        public init(index: Int? = nil, keyPhrases: [KeyPhrase]? = nil) {
            self.index = index
            self.keyPhrases = keyPhrases
        }

        private enum CodingKeys: String, CodingKey {
            case index = "Index"
            case keyPhrases = "KeyPhrases"
        }
    }

    public struct BatchDetectKeyPhrasesRequest: AWSEncodableShape {
        /// The language of the input documents. You can specify any of the primary languages supported by Amazon Comprehend. All documents must be in the same language.
        public let languageCode: LanguageCode
        /// A list containing the UTF-8 encoded text of the input documents. The list can contain a maximum of 25 documents. The maximum size of each document is 5 KB.
        public let textList: [String]

        public init(languageCode: LanguageCode, textList: [String]) {
            self.languageCode = languageCode
            self.textList = textList
        }

        public func validate(name: String) throws {
            try self.textList.forEach {
                try validate($0, name: "textList[]", parent: name, min: 1)
            }
            try self.validate(self.textList, name: "textList", parent: name, min: 1)
        }

        private enum CodingKeys: String, CodingKey {
            case languageCode = "LanguageCode"
            case textList = "TextList"
        }
    }

    public struct BatchDetectKeyPhrasesResponse: AWSDecodableShape {
        /// A list containing one  object for each document that contained an error. The results are sorted in ascending order by the Index field and match the order of the documents in the input list. If there are no errors in the batch, the ErrorList is empty.
        public let errorList: [BatchItemError]
        /// A list of  objects containing the results of the operation. The results are sorted in ascending order by the Index field and match the order of the documents in the input list. If all of the documents contain an error, the ResultList is empty.
        public let resultList: [BatchDetectKeyPhrasesItemResult]

        public init(errorList: [BatchItemError], resultList: [BatchDetectKeyPhrasesItemResult]) {
            self.errorList = errorList
            self.resultList = resultList
        }

        private enum CodingKeys: String, CodingKey {
            case errorList = "ErrorList"
            case resultList = "ResultList"
        }
    }

    public struct BatchDetectSentimentItemResult: AWSDecodableShape {
        /// The zero-based index of the document in the input list.
        public let index: Int?
        /// The sentiment detected in the document.
        public let sentiment: SentimentType?
        /// The level of confidence that Amazon Comprehend has in the accuracy of its sentiment detection.
        public let sentimentScore: SentimentScore?

        public init(index: Int? = nil, sentiment: SentimentType? = nil, sentimentScore: SentimentScore? = nil) {
            self.index = index
            self.sentiment = sentiment
            self.sentimentScore = sentimentScore
        }

        private enum CodingKeys: String, CodingKey {
            case index = "Index"
            case sentiment = "Sentiment"
            case sentimentScore = "SentimentScore"
        }
    }

    public struct BatchDetectSentimentRequest: AWSEncodableShape {
        /// The language of the input documents. You can specify any of the primary languages supported by Amazon Comprehend. All documents must be in the same language.
        public let languageCode: LanguageCode
        /// A list containing the UTF-8 encoded text of the input documents. The list can contain a maximum of 25 documents. The maximum size of each document is 5 KB.   Amazon Comprehend performs real-time sentiment analysis on the first 500 characters of the input text and ignores any additional text in the input.
        public let textList: [String]

        public init(languageCode: LanguageCode, textList: [String]) {
            self.languageCode = languageCode
            self.textList = textList
        }

        public func validate(name: String) throws {
            try self.textList.forEach {
                try validate($0, name: "textList[]", parent: name, min: 1)
            }
            try self.validate(self.textList, name: "textList", parent: name, min: 1)
        }

        private enum CodingKeys: String, CodingKey {
            case languageCode = "LanguageCode"
            case textList = "TextList"
        }
    }

    public struct BatchDetectSentimentResponse: AWSDecodableShape {
        /// A list containing one  object for each document that contained an error. The results are sorted in ascending order by the Index field and match the order of the documents in the input list. If there are no errors in the batch, the ErrorList is empty.
        public let errorList: [BatchItemError]
        /// A list of  objects containing the results of the operation. The results are sorted in ascending order by the Index field and match the order of the documents in the input list. If all of the documents contain an error, the ResultList is empty.
        public let resultList: [BatchDetectSentimentItemResult]

        public init(errorList: [BatchItemError], resultList: [BatchDetectSentimentItemResult]) {
            self.errorList = errorList
            self.resultList = resultList
        }

        private enum CodingKeys: String, CodingKey {
            case errorList = "ErrorList"
            case resultList = "ResultList"
        }
    }

    public struct BatchDetectSyntaxItemResult: AWSDecodableShape {
        /// The zero-based index of the document in the input list.
        public let index: Int?
        /// The syntax tokens for the words in the document, one token for each word.
        public let syntaxTokens: [SyntaxToken]?

        public init(index: Int? = nil, syntaxTokens: [SyntaxToken]? = nil) {
            self.index = index
            self.syntaxTokens = syntaxTokens
        }

        private enum CodingKeys: String, CodingKey {
            case index = "Index"
            case syntaxTokens = "SyntaxTokens"
        }
    }

    public struct BatchDetectSyntaxRequest: AWSEncodableShape {
        /// The language of the input documents. You can specify any of the following languages supported by Amazon Comprehend: German ("de"), English ("en"), Spanish ("es"), French ("fr"), Italian ("it"), or Portuguese ("pt"). All documents must be in the same language.
        public let languageCode: SyntaxLanguageCode
        /// A list containing the UTF-8 encoded text of the input documents. The list can contain a maximum of 25 documents. The maximum size for each document is 5 KB.
        public let textList: [String]

        public init(languageCode: SyntaxLanguageCode, textList: [String]) {
            self.languageCode = languageCode
            self.textList = textList
        }

        public func validate(name: String) throws {
            try self.textList.forEach {
                try validate($0, name: "textList[]", parent: name, min: 1)
            }
            try self.validate(self.textList, name: "textList", parent: name, min: 1)
        }

        private enum CodingKeys: String, CodingKey {
            case languageCode = "LanguageCode"
            case textList = "TextList"
        }
    }

    public struct BatchDetectSyntaxResponse: AWSDecodableShape {
        /// A list containing one  object for each document that contained an error. The results are sorted in ascending order by the Index field and match the order of the documents in the input list. If there are no errors in the batch, the ErrorList is empty.
        public let errorList: [BatchItemError]
        /// A list of  objects containing the results of the operation. The results are sorted in ascending order by the Index field and match the order of the documents in the input list. If all of the documents contain an error, the ResultList is empty.
        public let resultList: [BatchDetectSyntaxItemResult]

        public init(errorList: [BatchItemError], resultList: [BatchDetectSyntaxItemResult]) {
            self.errorList = errorList
            self.resultList = resultList
        }

        private enum CodingKeys: String, CodingKey {
            case errorList = "ErrorList"
            case resultList = "ResultList"
        }
    }

    public struct BatchDetectTargetedSentimentItemResult: AWSDecodableShape {
        /// An array of targeted sentiment entities.
        public let entities: [TargetedSentimentEntity]?
        /// The zero-based index of this result in the input list.
        public let index: Int?

        public init(entities: [TargetedSentimentEntity]? = nil, index: Int? = nil) {
            self.entities = entities
            self.index = index
        }

        private enum CodingKeys: String, CodingKey {
            case entities = "Entities"
            case index = "Index"
        }
    }

    public struct BatchDetectTargetedSentimentRequest: AWSEncodableShape {
        /// The language of the input documents. Currently, English is the only supported language.
        public let languageCode: LanguageCode
        /// A list containing the UTF-8 encoded text of the input documents. The list can contain a maximum of 25 documents. The maximum size of each document is 5 KB.
        public let textList: [String]

        public init(languageCode: LanguageCode, textList: [String]) {
            self.languageCode = languageCode
            self.textList = textList
        }

        public func validate(name: String) throws {
            try self.textList.forEach {
                try validate($0, name: "textList[]", parent: name, min: 1)
            }
            try self.validate(self.textList, name: "textList", parent: name, min: 1)
        }

        private enum CodingKeys: String, CodingKey {
            case languageCode = "LanguageCode"
            case textList = "TextList"
        }
    }

    public struct BatchDetectTargetedSentimentResponse: AWSDecodableShape {
        /// List of errors that the operation can return.
        public let errorList: [BatchItemError]
        /// A list of objects containing the results of the operation. The results are sorted in ascending order by the Index field and match the order of the documents in the input list. If all of the documents contain an error, the ResultList is empty.
        public let resultList: [BatchDetectTargetedSentimentItemResult]

        public init(errorList: [BatchItemError], resultList: [BatchDetectTargetedSentimentItemResult]) {
            self.errorList = errorList
            self.resultList = resultList
        }

        private enum CodingKeys: String, CodingKey {
            case errorList = "ErrorList"
            case resultList = "ResultList"
        }
    }

    public struct BatchItemError: AWSDecodableShape {
        /// The numeric error code of the error.
        public let errorCode: String?
        /// A text description of the error.
        public let errorMessage: String?
        /// The zero-based index of the document in the input list.
        public let index: Int?

        public init(errorCode: String? = nil, errorMessage: String? = nil, index: Int? = nil) {
            self.errorCode = errorCode
            self.errorMessage = errorMessage
            self.index = index
        }

        private enum CodingKeys: String, CodingKey {
            case errorCode = "ErrorCode"
            case errorMessage = "ErrorMessage"
            case index = "Index"
        }
    }

    public struct Block: AWSDecodableShape {
        /// The block represents a line of text or one word of text.   WORD - A word that's detected on a document page.  A word is one or more ISO basic Latin script characters that aren't separated by spaces.   LINE - A string of tab-delimited, contiguous words  that are detected on a document page
        public let blockType: BlockType?
        /// Co-ordinates of the rectangle or polygon that contains the text.
        public let geometry: Geometry?
        /// Unique identifier for the block.
        public let id: String?
        /// Page number where the block appears.
        public let page: Int?
        /// A list of child blocks of the current block.  For example, a LINE object has child blocks for each WORD block that's part of the line of text.
        public let relationships: [RelationshipsListItem]?
        /// The word or line of text extracted from the block.
        public let text: String?

        public init(blockType: BlockType? = nil, geometry: Geometry? = nil, id: String? = nil, page: Int? = nil, relationships: [RelationshipsListItem]? = nil, text: String? = nil) {
            self.blockType = blockType
            self.geometry = geometry
            self.id = id
            self.page = page
            self.relationships = relationships
            self.text = text
        }

        private enum CodingKeys: String, CodingKey {
            case blockType = "BlockType"
            case geometry = "Geometry"
            case id = "Id"
            case page = "Page"
            case relationships = "Relationships"
            case text = "Text"
        }
    }

    public struct BlockReference: AWSDecodableShape {
        /// Offset of the start of the block within its parent block.
        public let beginOffset: Int?
        /// Unique identifier for the block.
        public let blockId: String?
        /// List of child blocks within this block.
        public let childBlocks: [ChildBlock]?
        /// Offset of the end of the block within its parent block.
        public let endOffset: Int?

        public init(beginOffset: Int? = nil, blockId: String? = nil, childBlocks: [ChildBlock]? = nil, endOffset: Int? = nil) {
            self.beginOffset = beginOffset
            self.blockId = blockId
            self.childBlocks = childBlocks
            self.endOffset = endOffset
        }

        private enum CodingKeys: String, CodingKey {
            case beginOffset = "BeginOffset"
            case blockId = "BlockId"
            case childBlocks = "ChildBlocks"
            case endOffset = "EndOffset"
        }
    }

    public struct BoundingBox: AWSDecodableShape {
        /// The height of the bounding box as a ratio of the overall document page height.
        public let height: Float?
        /// The left coordinate of the bounding box as a ratio of overall document page width.
        public let left: Float?
        /// The top coordinate of the bounding box as a ratio of overall document page height.
        public let top: Float?
        /// The width of the bounding box as a ratio of the overall document page width.
        public let width: Float?

        public init(height: Float? = nil, left: Float? = nil, top: Float? = nil, width: Float? = nil) {
            self.height = height
            self.left = left
            self.top = top
            self.width = width
        }

        private enum CodingKeys: String, CodingKey {
            case height = "Height"
            case left = "Left"
            case top = "Top"
            case width = "Width"
        }
    }

    public struct ChildBlock: AWSDecodableShape {
        /// Offset of the start of the child block within its parent block.
        public let beginOffset: Int?
        /// Unique identifier for the child block.
        public let childBlockId: String?
        /// Offset of the end of the child block within its parent block.
        public let endOffset: Int?

        public init(beginOffset: Int? = nil, childBlockId: String? = nil, endOffset: Int? = nil) {
            self.beginOffset = beginOffset
            self.childBlockId = childBlockId
            self.endOffset = endOffset
        }

        private enum CodingKeys: String, CodingKey {
            case beginOffset = "BeginOffset"
            case childBlockId = "ChildBlockId"
            case endOffset = "EndOffset"
        }
    }

    public struct ClassifierEvaluationMetrics: AWSDecodableShape {
        /// The fraction of the labels that were correct recognized. It is computed by dividing the number of labels in the test documents that were correctly recognized by the total number of labels in the test documents.
        public let accuracy: Double?
        /// A measure of how accurate the classifier results are for the test data. It is derived from the Precision and Recall values. The F1Score is the harmonic average of the two scores. The highest score is 1, and the worst score is 0.
        public let f1Score: Double?
        /// Indicates the fraction of labels that are incorrectly predicted. Also seen as the fraction of wrong labels compared to the total number of labels. Scores closer to zero are better.
        public let hammingLoss: Double?
        /// A measure of how accurate the classifier results are for the test data. It is a combination of the Micro Precision and Micro Recall values. The Micro F1Score is the harmonic mean of the two scores. The highest score is 1, and the worst score is 0.
        public let microF1Score: Double?
        /// A measure of the usefulness of the recognizer results in the test data. High precision means that the recognizer returned substantially more relevant results than irrelevant ones. Unlike the Precision metric which comes from averaging the precision of all available labels, this is based on the overall score of all precision scores added together.
        public let microPrecision: Double?
        /// A measure of how complete the classifier results are for the test data. High recall means that the classifier returned most of the relevant results. Specifically, this indicates how many of the correct categories in the text that the model can predict. It is a percentage of correct categories in the text that can found. Instead of averaging the recall scores of all labels (as with Recall), micro Recall is based on the overall score of all recall scores added together.
        public let microRecall: Double?
        /// A measure of the usefulness of the classifier results in the test data. High precision means that the classifier returned substantially more relevant results than irrelevant ones.
        public let precision: Double?
        /// A measure of how complete the classifier results are for the test data. High recall means that the classifier returned most of the relevant results.
        public let recall: Double?

        public init(accuracy: Double? = nil, f1Score: Double? = nil, hammingLoss: Double? = nil, microF1Score: Double? = nil, microPrecision: Double? = nil, microRecall: Double? = nil, precision: Double? = nil, recall: Double? = nil) {
            self.accuracy = accuracy
            self.f1Score = f1Score
            self.hammingLoss = hammingLoss
            self.microF1Score = microF1Score
            self.microPrecision = microPrecision
            self.microRecall = microRecall
            self.precision = precision
            self.recall = recall
        }

        private enum CodingKeys: String, CodingKey {
            case accuracy = "Accuracy"
            case f1Score = "F1Score"
            case hammingLoss = "HammingLoss"
            case microF1Score = "MicroF1Score"
            case microPrecision = "MicroPrecision"
            case microRecall = "MicroRecall"
            case precision = "Precision"
            case recall = "Recall"
        }
    }

    public struct ClassifierMetadata: AWSDecodableShape {
        ///  Describes the result metrics for the test data associated with an documentation classifier.
        public let evaluationMetrics: ClassifierEvaluationMetrics?
        /// The number of labels in the input data.
        public let numberOfLabels: Int?
        /// The number of documents in the input data that were used to test the classifier. Typically this is 10 to 20 percent of the input documents, up to 10,000 documents.
        public let numberOfTestDocuments: Int?
        /// The number of documents in the input data that were used to train the classifier. Typically this is 80 to 90 percent of the input documents.
        public let numberOfTrainedDocuments: Int?

        public init(evaluationMetrics: ClassifierEvaluationMetrics? = nil, numberOfLabels: Int? = nil, numberOfTestDocuments: Int? = nil, numberOfTrainedDocuments: Int? = nil) {
            self.evaluationMetrics = evaluationMetrics
            self.numberOfLabels = numberOfLabels
            self.numberOfTestDocuments = numberOfTestDocuments
            self.numberOfTrainedDocuments = numberOfTrainedDocuments
        }

        private enum CodingKeys: String, CodingKey {
            case evaluationMetrics = "EvaluationMetrics"
            case numberOfLabels = "NumberOfLabels"
            case numberOfTestDocuments = "NumberOfTestDocuments"
            case numberOfTrainedDocuments = "NumberOfTrainedDocuments"
        }
    }

    public struct ClassifyDocumentRequest: AWSEncodableShape {
        /// Use the Bytes parameter to input a text, PDF, Word or image file. You can also use the Bytes parameter to input an Amazon Textract DetectDocumentText  or AnalyzeDocument output file. Provide the input document as a sequence of base64-encoded bytes.  If your code uses an Amazon Web Services SDK to classify documents, the SDK may encode  the document file bytes for you.  The maximum length of this field depends on the input document type. For details, see  Inputs for real-time custom analysis in the Comprehend Developer Guide.  If you use the Bytes parameter, do not use the Text parameter.
        public let bytes: AWSBase64Data?
        /// Provides configuration parameters to override the default actions for extracting text  from PDF documents and image files.
        public let documentReaderConfig: DocumentReaderConfig?
        /// The Amazon Resource Number (ARN) of the endpoint. For information about endpoints, see Managing endpoints.
        public let endpointArn: String
        /// The document text to be analyzed. If you enter text using this parameter, do not use the Bytes parameter.
        public let text: String?

        public init(bytes: AWSBase64Data? = nil, documentReaderConfig: DocumentReaderConfig? = nil, endpointArn: String, text: String? = nil) {
            self.bytes = bytes
            self.documentReaderConfig = documentReaderConfig
            self.endpointArn = endpointArn
            self.text = text
        }

        public func validate(name: String) throws {
            try self.validate(self.bytes, name: "bytes", parent: name, min: 1)
            try self.documentReaderConfig?.validate(name: "\(name).documentReaderConfig")
            try self.validate(self.endpointArn, name: "endpointArn", parent: name, max: 256)
            try self.validate(self.endpointArn, name: "endpointArn", parent: name, pattern: "^arn:aws(-[^:]+)?:comprehend:[a-zA-Z0-9-]*:[0-9]{12}:document-classifier-endpoint/[a-zA-Z0-9](-*[a-zA-Z0-9])*$")
            try self.validate(self.text, name: "text", parent: name, min: 1)
        }

        private enum CodingKeys: String, CodingKey {
            case bytes = "Bytes"
            case documentReaderConfig = "DocumentReaderConfig"
            case endpointArn = "EndpointArn"
            case text = "Text"
        }
    }

    public struct ClassifyDocumentResponse: AWSDecodableShape {
        /// The classes used by the document being analyzed. These are used for multi-class trained models. Individual classes are mutually exclusive and each document is expected to have only a single class assigned to it. For example, an animal can be a dog or a cat, but not both at the same time.
        public let classes: [DocumentClass]?
        /// Extraction information about the document. This field is present in the response only if your request includes the Byte parameter.
        public let documentMetadata: DocumentMetadata?
        /// The document type for each page in the input document. This field is present in the response only if your request includes the Byte parameter.
        public let documentType: [DocumentTypeListItem]?
        /// Page-level errors that the system detected while processing the input document.  The field is empty if the system encountered no errors.
        public let errors: [ErrorsListItem]?
        /// The labels used the document being analyzed. These are used for multi-label trained models. Individual labels represent different categories that are related in some manner and are not mutually exclusive. For example, a movie can be just an action movie, or it can be an action movie, a science fiction movie, and a comedy, all at the same time.
        public let labels: [DocumentLabel]?

        public init(classes: [DocumentClass]? = nil, documentMetadata: DocumentMetadata? = nil, documentType: [DocumentTypeListItem]? = nil, errors: [ErrorsListItem]? = nil, labels: [DocumentLabel]? = nil) {
            self.classes = classes
            self.documentMetadata = documentMetadata
            self.documentType = documentType
            self.errors = errors
            self.labels = labels
        }

        private enum CodingKeys: String, CodingKey {
            case classes = "Classes"
            case documentMetadata = "DocumentMetadata"
            case documentType = "DocumentType"
            case errors = "Errors"
            case labels = "Labels"
        }
    }

    public struct ContainsPiiEntitiesRequest: AWSEncodableShape {
        /// The language of the input documents. Currently, English is the only valid language.
        public let languageCode: LanguageCode
        /// A UTF-8 text string. The maximum string size is 100 KB.
        public let text: String

        public init(languageCode: LanguageCode, text: String) {
            self.languageCode = languageCode
            self.text = text
        }

        public func validate(name: String) throws {
            try self.validate(self.text, name: "text", parent: name, min: 1)
        }

        private enum CodingKeys: String, CodingKey {
            case languageCode = "LanguageCode"
            case text = "Text"
        }
    }

    public struct ContainsPiiEntitiesResponse: AWSDecodableShape {
        /// The labels used in the document being analyzed. Individual labels represent personally identifiable information (PII) entity types.
        public let labels: [EntityLabel]?

        public init(labels: [EntityLabel]? = nil) {
            self.labels = labels
        }

        private enum CodingKeys: String, CodingKey {
            case labels = "Labels"
        }
    }

    public struct CreateDocumentClassifierRequest: AWSEncodableShape {
        /// A unique identifier for the request. If you don't set the client request token, Amazon Comprehend generates one.
        public let clientRequestToken: String?
        /// The Amazon Resource Name (ARN) of the AWS Identity and Management (IAM) role that grants Amazon Comprehend read access to your input data.
        public let dataAccessRoleArn: String
        /// The name of the document classifier.
        public let documentClassifierName: String
        /// Specifies the format and location of the input data for the job.
        public let inputDataConfig: DocumentClassifierInputDataConfig
        /// The language of the input documents. You can specify any of the following languages supported by Amazon Comprehend: German ("de"), English ("en"), Spanish ("es"), French ("fr"), Italian ("it"), or Portuguese ("pt"). All documents must be in the same language.
        public let languageCode: LanguageCode
        /// Indicates the mode in which the classifier will be trained. The classifier can be trained in multi-class mode, which identifies one and only one class for each document, or multi-label mode, which identifies one or more labels for each document. In multi-label mode, multiple labels for an individual document are separated by a delimiter. The default delimiter between labels is a pipe (|).
        public let mode: DocumentClassifierMode?
        /// ID for the AWS Key Management Service (KMS) key that Amazon Comprehend uses to encrypt trained custom models. The ModelKmsKeyId can be either of the following formats:   KMS Key ID: "1234abcd-12ab-34cd-56ef-1234567890ab"    Amazon Resource Name (ARN) of a KMS Key: "arn:aws:kms:us-west-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab"
        public let modelKmsKeyId: String?
        /// The resource-based policy to attach to your custom document classifier model. You can use this policy to allow another AWS account to import your custom model. Provide your policy as a JSON body that you enter as a UTF-8 encoded string without line breaks. To provide valid JSON, enclose the attribute names and values in double quotes. If the JSON body is also enclosed in double quotes, then you must escape the double quotes that are inside the policy:  "{\"attribute\": \"value\", \"attribute\": [\"value\"]}"  To avoid escaping quotes, you can use single quotes to enclose the policy and double quotes to enclose the JSON names and values:  '{"attribute": "value", "attribute": ["value"]}'
        public let modelPolicy: String?
        /// Enables the addition of output results configuration parameters for custom classifier jobs.
        public let outputDataConfig: DocumentClassifierOutputDataConfig?
        /// Tags to be associated with the document classifier being created. A tag is a key-value pair that adds as a metadata to a resource used by Amazon Comprehend. For example, a tag with "Sales" as the key might be added to a resource to indicate its use by the sales department.
        public let tags: [Tag]?
        /// The version name given to the newly created classifier. Version names can have a maximum of 256 characters. Alphanumeric characters, hyphens (-) and underscores (_) are allowed. The version name must be unique among all models with the same classifier name in the account/AWS Region.
        public let versionName: String?
        /// ID for the AWS Key Management Service (KMS) key that Amazon Comprehend uses to encrypt data on the storage volume attached to the ML compute instance(s) that process the analysis job. The VolumeKmsKeyId can be either of the following formats:   KMS Key ID: "1234abcd-12ab-34cd-56ef-1234567890ab"    Amazon Resource Name (ARN) of a KMS Key: "arn:aws:kms:us-west-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab"
        public let volumeKmsKeyId: String?
        /// Configuration parameters for an optional private Virtual Private Cloud (VPC) containing the resources you are using for your custom classifier. For more information, see Amazon VPC.
        public let vpcConfig: VpcConfig?

        public init(clientRequestToken: String? = CreateDocumentClassifierRequest.idempotencyToken(), dataAccessRoleArn: String, documentClassifierName: String, inputDataConfig: DocumentClassifierInputDataConfig, languageCode: LanguageCode, mode: DocumentClassifierMode? = nil, modelKmsKeyId: String? = nil, modelPolicy: String? = nil, outputDataConfig: DocumentClassifierOutputDataConfig? = nil, tags: [Tag]? = nil, versionName: String? = nil, volumeKmsKeyId: String? = nil, vpcConfig: VpcConfig? = nil) {
            self.clientRequestToken = clientRequestToken
            self.dataAccessRoleArn = dataAccessRoleArn
            self.documentClassifierName = documentClassifierName
            self.inputDataConfig = inputDataConfig
            self.languageCode = languageCode
            self.mode = mode
            self.modelKmsKeyId = modelKmsKeyId
            self.modelPolicy = modelPolicy
            self.outputDataConfig = outputDataConfig
            self.tags = tags
            self.versionName = versionName
            self.volumeKmsKeyId = volumeKmsKeyId
            self.vpcConfig = vpcConfig
        }

        public func validate(name: String) throws {
            try self.validate(self.clientRequestToken, name: "clientRequestToken", parent: name, max: 64)
            try self.validate(self.clientRequestToken, name: "clientRequestToken", parent: name, min: 1)
            try self.validate(self.clientRequestToken, name: "clientRequestToken", parent: name, pattern: "^[a-zA-Z0-9-]+$")
            try self.validate(self.dataAccessRoleArn, name: "dataAccessRoleArn", parent: name, max: 2048)
            try self.validate(self.dataAccessRoleArn, name: "dataAccessRoleArn", parent: name, min: 20)
            try self.validate(self.dataAccessRoleArn, name: "dataAccessRoleArn", parent: name, pattern: "^arn:aws(-[^:]+)?:iam::[0-9]{12}:role/.+$")
            try self.validate(self.documentClassifierName, name: "documentClassifierName", parent: name, max: 63)
            try self.validate(self.documentClassifierName, name: "documentClassifierName", parent: name, pattern: "^[a-zA-Z0-9](-*[a-zA-Z0-9])*$")
            try self.inputDataConfig.validate(name: "\(name).inputDataConfig")
            try self.validate(self.modelKmsKeyId, name: "modelKmsKeyId", parent: name, max: 2048)
            try self.validate(self.modelKmsKeyId, name: "modelKmsKeyId", parent: name, pattern: "^\\p{ASCII}+$")
            try self.validate(self.modelPolicy, name: "modelPolicy", parent: name, max: 20000)
            try self.validate(self.modelPolicy, name: "modelPolicy", parent: name, min: 1)
            try self.validate(self.modelPolicy, name: "modelPolicy", parent: name, pattern: "^[\\u0009\\u000A\\u000D\\u0020-\\u00FF]+$")
            try self.outputDataConfig?.validate(name: "\(name).outputDataConfig")
            try self.tags?.forEach {
                try $0.validate(name: "\(name).tags[]")
            }
            try self.validate(self.versionName, name: "versionName", parent: name, max: 63)
            try self.validate(self.versionName, name: "versionName", parent: name, pattern: "^[a-zA-Z0-9](-*[a-zA-Z0-9])*$")
            try self.validate(self.volumeKmsKeyId, name: "volumeKmsKeyId", parent: name, max: 2048)
            try self.validate(self.volumeKmsKeyId, name: "volumeKmsKeyId", parent: name, pattern: "^\\p{ASCII}+$")
            try self.vpcConfig?.validate(name: "\(name).vpcConfig")
        }

        private enum CodingKeys: String, CodingKey {
            case clientRequestToken = "ClientRequestToken"
            case dataAccessRoleArn = "DataAccessRoleArn"
            case documentClassifierName = "DocumentClassifierName"
            case inputDataConfig = "InputDataConfig"
            case languageCode = "LanguageCode"
            case mode = "Mode"
            case modelKmsKeyId = "ModelKmsKeyId"
            case modelPolicy = "ModelPolicy"
            case outputDataConfig = "OutputDataConfig"
            case tags = "Tags"
            case versionName = "VersionName"
            case volumeKmsKeyId = "VolumeKmsKeyId"
            case vpcConfig = "VpcConfig"
        }
    }

    public struct CreateDocumentClassifierResponse: AWSDecodableShape {
        /// The Amazon Resource Name (ARN) that identifies the document classifier.
        public let documentClassifierArn: String?

        public init(documentClassifierArn: String? = nil) {
            self.documentClassifierArn = documentClassifierArn
        }

        private enum CodingKeys: String, CodingKey {
            case documentClassifierArn = "DocumentClassifierArn"
        }
    }

    public struct CreateEndpointRequest: AWSEncodableShape {
        /// An idempotency token provided by the customer. If this token matches a previous endpoint creation request, Amazon Comprehend will not return a ResourceInUseException.
        public let clientRequestToken: String?
        /// The Amazon Resource Name (ARN) of the AWS identity and Access Management (IAM) role that grants Amazon Comprehend read access to trained custom models encrypted with a customer managed key (ModelKmsKeyId).
        public let dataAccessRoleArn: String?
        ///  The desired number of inference units to be used by the model using this endpoint.  Each inference unit represents of a throughput of 100 characters per second.
        public let desiredInferenceUnits: Int
        /// This is the descriptive suffix that becomes part of the EndpointArn used for all subsequent requests to this resource.
        public let endpointName: String
        /// The Amazon Resource Number (ARN) of the model to which the endpoint will be attached.
        public let modelArn: String
        /// Tags associated with the endpoint being created. A tag is a key-value pair that adds metadata to the endpoint. For example, a tag with "Sales" as the key might be added to an endpoint to indicate its use by the sales department.
        public let tags: [Tag]?

        public init(clientRequestToken: String? = CreateEndpointRequest.idempotencyToken(), dataAccessRoleArn: String? = nil, desiredInferenceUnits: Int, endpointName: String, modelArn: String, tags: [Tag]? = nil) {
            self.clientRequestToken = clientRequestToken
            self.dataAccessRoleArn = dataAccessRoleArn
            self.desiredInferenceUnits = desiredInferenceUnits
            self.endpointName = endpointName
            self.modelArn = modelArn
            self.tags = tags
        }

        public func validate(name: String) throws {
            try self.validate(self.clientRequestToken, name: "clientRequestToken", parent: name, max: 64)
            try self.validate(self.clientRequestToken, name: "clientRequestToken", parent: name, min: 1)
            try self.validate(self.clientRequestToken, name: "clientRequestToken", parent: name, pattern: "^[a-zA-Z0-9-]+$")
            try self.validate(self.dataAccessRoleArn, name: "dataAccessRoleArn", parent: name, max: 2048)
            try self.validate(self.dataAccessRoleArn, name: "dataAccessRoleArn", parent: name, min: 20)
            try self.validate(self.dataAccessRoleArn, name: "dataAccessRoleArn", parent: name, pattern: "^arn:aws(-[^:]+)?:iam::[0-9]{12}:role/.+$")
            try self.validate(self.desiredInferenceUnits, name: "desiredInferenceUnits", parent: name, min: 1)
            try self.validate(self.endpointName, name: "endpointName", parent: name, max: 40)
            try self.validate(self.endpointName, name: "endpointName", parent: name, pattern: "^[a-zA-Z0-9](-*[a-zA-Z0-9])*$")
            try self.validate(self.modelArn, name: "modelArn", parent: name, max: 256)
            try self.validate(self.modelArn, name: "modelArn", parent: name, pattern: "^arn:aws(-[^:]+)?:comprehend:[a-zA-Z0-9-]*:[0-9]{12}:(document-classifier|entity-recognizer)/[a-zA-Z0-9](-*[a-zA-Z0-9])*(/version/[a-zA-Z0-9](-*[a-zA-Z0-9])*)?$")
            try self.tags?.forEach {
                try $0.validate(name: "\(name).tags[]")
            }
        }

        private enum CodingKeys: String, CodingKey {
            case clientRequestToken = "ClientRequestToken"
            case dataAccessRoleArn = "DataAccessRoleArn"
            case desiredInferenceUnits = "DesiredInferenceUnits"
            case endpointName = "EndpointName"
            case modelArn = "ModelArn"
            case tags = "Tags"
        }
    }

    public struct CreateEndpointResponse: AWSDecodableShape {
        /// The Amazon Resource Number (ARN) of the endpoint being created.
        public let endpointArn: String?

        public init(endpointArn: String? = nil) {
            self.endpointArn = endpointArn
        }

        private enum CodingKeys: String, CodingKey {
            case endpointArn = "EndpointArn"
        }
    }

    public struct CreateEntityRecognizerRequest: AWSEncodableShape {
        ///  A unique identifier for the request. If you don't set the client request token, Amazon Comprehend generates one.
        public let clientRequestToken: String?
        /// The Amazon Resource Name (ARN) of the AWS Identity and Management (IAM) role that grants Amazon Comprehend read access to your input data.
        public let dataAccessRoleArn: String
        /// Specifies the format and location of the input data. The S3 bucket containing the input data must be located in the same region as the entity recognizer being created.
        public let inputDataConfig: EntityRecognizerInputDataConfig
        ///  You can specify any of the following languages: English ("en"), Spanish ("es"), French ("fr"), Italian ("it"), German ("de"), or Portuguese ("pt"). If you plan to use this entity recognizer with PDF, Word, or image input files, you must  specify English as the language.  All training documents must be in the same language.
        public let languageCode: LanguageCode
        /// ID for the AWS Key Management Service (KMS) key that Amazon Comprehend uses to encrypt trained custom models. The ModelKmsKeyId can be either of the following formats   KMS Key ID: "1234abcd-12ab-34cd-56ef-1234567890ab"    Amazon Resource Name (ARN) of a KMS Key: "arn:aws:kms:us-west-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab"
        public let modelKmsKeyId: String?
        /// The JSON resource-based policy to attach to your custom entity recognizer model. You can use this policy to allow another AWS account to import your custom model. Provide your JSON as a UTF-8 encoded string without line breaks. To provide valid JSON for your policy, enclose the attribute names and values in double quotes. If the JSON body is also enclosed in double quotes, then you must escape the double quotes that are inside the policy:  "{\"attribute\": \"value\", \"attribute\": [\"value\"]}"  To avoid escaping quotes, you can use single quotes to enclose the policy and double quotes to enclose the JSON names and values:  '{"attribute": "value", "attribute": ["value"]}'
        public let modelPolicy: String?
        /// The name given to the newly created recognizer. Recognizer names can be a maximum of 256 characters. Alphanumeric characters, hyphens (-) and underscores (_) are allowed. The name must be unique in the account/region.
        public let recognizerName: String
        /// Tags to be associated with the entity recognizer being created. A tag is a key-value pair that adds as a metadata to a resource used by Amazon Comprehend. For example, a tag with "Sales" as the key might be added to a resource to indicate its use by the sales department.
        public let tags: [Tag]?
        /// The version name given to the newly created recognizer. Version names can be a maximum of 256 characters. Alphanumeric characters, hyphens (-) and underscores (_) are allowed. The version name must be unique among all models with the same recognizer name in the account/ AWS Region.
        public let versionName: String?
        /// ID for the AWS Key Management Service (KMS) key that Amazon Comprehend uses to encrypt data on the storage volume attached to the ML compute instance(s) that process the analysis job. The VolumeKmsKeyId can be either of the following formats:   KMS Key ID: "1234abcd-12ab-34cd-56ef-1234567890ab"    Amazon Resource Name (ARN) of a KMS Key: "arn:aws:kms:us-west-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab"
        public let volumeKmsKeyId: String?
        /// Configuration parameters for an optional private Virtual Private Cloud (VPC) containing the resources you are using for your custom entity recognizer. For more information, see Amazon VPC.
        public let vpcConfig: VpcConfig?

        public init(clientRequestToken: String? = CreateEntityRecognizerRequest.idempotencyToken(), dataAccessRoleArn: String, inputDataConfig: EntityRecognizerInputDataConfig, languageCode: LanguageCode, modelKmsKeyId: String? = nil, modelPolicy: String? = nil, recognizerName: String, tags: [Tag]? = nil, versionName: String? = nil, volumeKmsKeyId: String? = nil, vpcConfig: VpcConfig? = nil) {
            self.clientRequestToken = clientRequestToken
            self.dataAccessRoleArn = dataAccessRoleArn
            self.inputDataConfig = inputDataConfig
            self.languageCode = languageCode
            self.modelKmsKeyId = modelKmsKeyId
            self.modelPolicy = modelPolicy
            self.recognizerName = recognizerName
            self.tags = tags
            self.versionName = versionName
            self.volumeKmsKeyId = volumeKmsKeyId
            self.vpcConfig = vpcConfig
        }

        public func validate(name: String) throws {
            try self.validate(self.clientRequestToken, name: "clientRequestToken", parent: name, max: 64)
            try self.validate(self.clientRequestToken, name: "clientRequestToken", parent: name, min: 1)
            try self.validate(self.clientRequestToken, name: "clientRequestToken", parent: name, pattern: "^[a-zA-Z0-9-]+$")
            try self.validate(self.dataAccessRoleArn, name: "dataAccessRoleArn", parent: name, max: 2048)
            try self.validate(self.dataAccessRoleArn, name: "dataAccessRoleArn", parent: name, min: 20)
            try self.validate(self.dataAccessRoleArn, name: "dataAccessRoleArn", parent: name, pattern: "^arn:aws(-[^:]+)?:iam::[0-9]{12}:role/.+$")
            try self.inputDataConfig.validate(name: "\(name).inputDataConfig")
            try self.validate(self.modelKmsKeyId, name: "modelKmsKeyId", parent: name, max: 2048)
            try self.validate(self.modelKmsKeyId, name: "modelKmsKeyId", parent: name, pattern: "^\\p{ASCII}+$")
            try self.validate(self.modelPolicy, name: "modelPolicy", parent: name, max: 20000)
            try self.validate(self.modelPolicy, name: "modelPolicy", parent: name, min: 1)
            try self.validate(self.modelPolicy, name: "modelPolicy", parent: name, pattern: "^[\\u0009\\u000A\\u000D\\u0020-\\u00FF]+$")
            try self.validate(self.recognizerName, name: "recognizerName", parent: name, max: 63)
            try self.validate(self.recognizerName, name: "recognizerName", parent: name, pattern: "^[a-zA-Z0-9](-*[a-zA-Z0-9])*$")
            try self.tags?.forEach {
                try $0.validate(name: "\(name).tags[]")
            }
            try self.validate(self.versionName, name: "versionName", parent: name, max: 63)
            try self.validate(self.versionName, name: "versionName", parent: name, pattern: "^[a-zA-Z0-9](-*[a-zA-Z0-9])*$")
            try self.validate(self.volumeKmsKeyId, name: "volumeKmsKeyId", parent: name, max: 2048)
            try self.validate(self.volumeKmsKeyId, name: "volumeKmsKeyId", parent: name, pattern: "^\\p{ASCII}+$")
            try self.vpcConfig?.validate(name: "\(name).vpcConfig")
        }

        private enum CodingKeys: String, CodingKey {
            case clientRequestToken = "ClientRequestToken"
            case dataAccessRoleArn = "DataAccessRoleArn"
            case inputDataConfig = "InputDataConfig"
            case languageCode = "LanguageCode"
            case modelKmsKeyId = "ModelKmsKeyId"
            case modelPolicy = "ModelPolicy"
            case recognizerName = "RecognizerName"
            case tags = "Tags"
            case versionName = "VersionName"
            case volumeKmsKeyId = "VolumeKmsKeyId"
            case vpcConfig = "VpcConfig"
        }
    }

    public struct CreateEntityRecognizerResponse: AWSDecodableShape {
        /// The Amazon Resource Name (ARN) that identifies the entity recognizer.
        public let entityRecognizerArn: String?

        public init(entityRecognizerArn: String? = nil) {
            self.entityRecognizerArn = entityRecognizerArn
        }

        private enum CodingKeys: String, CodingKey {
            case entityRecognizerArn = "EntityRecognizerArn"
        }
    }

    public struct DeleteDocumentClassifierRequest: AWSEncodableShape {
        /// The Amazon Resource Name (ARN) that identifies the document classifier.
        public let documentClassifierArn: String

        public init(documentClassifierArn: String) {
            self.documentClassifierArn = documentClassifierArn
        }

        public func validate(name: String) throws {
            try self.validate(self.documentClassifierArn, name: "documentClassifierArn", parent: name, max: 256)
            try self.validate(self.documentClassifierArn, name: "documentClassifierArn", parent: name, pattern: "^arn:aws(-[^:]+)?:comprehend:[a-zA-Z0-9-]*:[0-9]{12}:document-classifier/[a-zA-Z0-9](-*[a-zA-Z0-9])*(/version/[a-zA-Z0-9](-*[a-zA-Z0-9])*)?$")
        }

        private enum CodingKeys: String, CodingKey {
            case documentClassifierArn = "DocumentClassifierArn"
        }
    }

    public struct DeleteDocumentClassifierResponse: AWSDecodableShape {
        public init() {}
    }

    public struct DeleteEndpointRequest: AWSEncodableShape {
        /// The Amazon Resource Number (ARN) of the endpoint being deleted.
        public let endpointArn: String

        public init(endpointArn: String) {
            self.endpointArn = endpointArn
        }

        public func validate(name: String) throws {
            try self.validate(self.endpointArn, name: "endpointArn", parent: name, max: 256)
            try self.validate(self.endpointArn, name: "endpointArn", parent: name, pattern: "^arn:aws(-[^:]+)?:comprehend:[a-zA-Z0-9-]*:[0-9]{12}:(document-classifier-endpoint|entity-recognizer-endpoint)/[a-zA-Z0-9](-*[a-zA-Z0-9])*$")
        }

        private enum CodingKeys: String, CodingKey {
            case endpointArn = "EndpointArn"
        }
    }

    public struct DeleteEndpointResponse: AWSDecodableShape {
        public init() {}
    }

    public struct DeleteEntityRecognizerRequest: AWSEncodableShape {
        /// The Amazon Resource Name (ARN) that identifies the entity recognizer.
        public let entityRecognizerArn: String

        public init(entityRecognizerArn: String) {
            self.entityRecognizerArn = entityRecognizerArn
        }

        public func validate(name: String) throws {
            try self.validate(self.entityRecognizerArn, name: "entityRecognizerArn", parent: name, max: 256)
            try self.validate(self.entityRecognizerArn, name: "entityRecognizerArn", parent: name, pattern: "^arn:aws(-[^:]+)?:comprehend:[a-zA-Z0-9-]*:[0-9]{12}:entity-recognizer/[a-zA-Z0-9](-*[a-zA-Z0-9])*(/version/[a-zA-Z0-9](-*[a-zA-Z0-9])*)?$")
        }

        private enum CodingKeys: String, CodingKey {
            case entityRecognizerArn = "EntityRecognizerArn"
        }
    }

    public struct DeleteEntityRecognizerResponse: AWSDecodableShape {
        public init() {}
    }

    public struct DeleteResourcePolicyRequest: AWSEncodableShape {
        /// The revision ID of the policy to delete.
        public let policyRevisionId: String?
        /// The Amazon Resource Name (ARN) of the custom model version that has the policy to delete.
        public let resourceArn: String

        public init(policyRevisionId: String? = nil, resourceArn: String) {
            self.policyRevisionId = policyRevisionId
            self.resourceArn = resourceArn
        }

        public func validate(name: String) throws {
            try self.validate(self.policyRevisionId, name: "policyRevisionId", parent: name, max: 64)
            try self.validate(self.policyRevisionId, name: "policyRevisionId", parent: name, pattern: "^[0-9A-Fa-f]+$")
            try self.validate(self.resourceArn, name: "resourceArn", parent: name, max: 256)
            try self.validate(self.resourceArn, name: "resourceArn", parent: name, pattern: "^arn:aws(-[^:]+)?:comprehend:[a-zA-Z0-9-]*:[0-9]{12}:(document-classifier|entity-recognizer)/[a-zA-Z0-9](-*[a-zA-Z0-9])*(/version/[a-zA-Z0-9](-*[a-zA-Z0-9])*)?$")
        }

        private enum CodingKeys: String, CodingKey {
            case policyRevisionId = "PolicyRevisionId"
            case resourceArn = "ResourceArn"
        }
    }

    public struct DeleteResourcePolicyResponse: AWSDecodableShape {
        public init() {}
    }

    public struct DescribeDocumentClassificationJobRequest: AWSEncodableShape {
        /// The identifier that Amazon Comprehend generated for the job. The  operation returns this identifier in its response.
        public let jobId: String

        public init(jobId: String) {
            self.jobId = jobId
        }

        public func validate(name: String) throws {
            try self.validate(self.jobId, name: "jobId", parent: name, max: 32)
            try self.validate(self.jobId, name: "jobId", parent: name, min: 1)
            try self.validate(self.jobId, name: "jobId", parent: name, pattern: "^([\\p{L}\\p{Z}\\p{N}_.:/=+\\-%@]*)$")
        }

        private enum CodingKeys: String, CodingKey {
            case jobId = "JobId"
        }
    }

    public struct DescribeDocumentClassificationJobResponse: AWSDecodableShape {
        /// An object that describes the properties associated with the document classification job.
        public let documentClassificationJobProperties: DocumentClassificationJobProperties?

        public init(documentClassificationJobProperties: DocumentClassificationJobProperties? = nil) {
            self.documentClassificationJobProperties = documentClassificationJobProperties
        }

        private enum CodingKeys: String, CodingKey {
            case documentClassificationJobProperties = "DocumentClassificationJobProperties"
        }
    }

    public struct DescribeDocumentClassifierRequest: AWSEncodableShape {
        /// The Amazon Resource Name (ARN) that identifies the document classifier. The  operation returns this identifier in its response.
        public let documentClassifierArn: String

        public init(documentClassifierArn: String) {
            self.documentClassifierArn = documentClassifierArn
        }

        public func validate(name: String) throws {
            try self.validate(self.documentClassifierArn, name: "documentClassifierArn", parent: name, max: 256)
            try self.validate(self.documentClassifierArn, name: "documentClassifierArn", parent: name, pattern: "^arn:aws(-[^:]+)?:comprehend:[a-zA-Z0-9-]*:[0-9]{12}:document-classifier/[a-zA-Z0-9](-*[a-zA-Z0-9])*(/version/[a-zA-Z0-9](-*[a-zA-Z0-9])*)?$")
        }

        private enum CodingKeys: String, CodingKey {
            case documentClassifierArn = "DocumentClassifierArn"
        }
    }

    public struct DescribeDocumentClassifierResponse: AWSDecodableShape {
        /// An object that contains the properties associated with a document classifier.
        public let documentClassifierProperties: DocumentClassifierProperties?

        public init(documentClassifierProperties: DocumentClassifierProperties? = nil) {
            self.documentClassifierProperties = documentClassifierProperties
        }

        private enum CodingKeys: String, CodingKey {
            case documentClassifierProperties = "DocumentClassifierProperties"
        }
    }

    public struct DescribeDominantLanguageDetectionJobRequest: AWSEncodableShape {
        /// The identifier that Amazon Comprehend generated for the job. The  operation returns this identifier in its response.
        public let jobId: String

        public init(jobId: String) {
            self.jobId = jobId
        }

        public func validate(name: String) throws {
            try self.validate(self.jobId, name: "jobId", parent: name, max: 32)
            try self.validate(self.jobId, name: "jobId", parent: name, min: 1)
            try self.validate(self.jobId, name: "jobId", parent: name, pattern: "^([\\p{L}\\p{Z}\\p{N}_.:/=+\\-%@]*)$")
        }

        private enum CodingKeys: String, CodingKey {
            case jobId = "JobId"
        }
    }

    public struct DescribeDominantLanguageDetectionJobResponse: AWSDecodableShape {
        /// An object that contains the properties associated with a dominant language detection job.
        public let dominantLanguageDetectionJobProperties: DominantLanguageDetectionJobProperties?

        public init(dominantLanguageDetectionJobProperties: DominantLanguageDetectionJobProperties? = nil) {
            self.dominantLanguageDetectionJobProperties = dominantLanguageDetectionJobProperties
        }

        private enum CodingKeys: String, CodingKey {
            case dominantLanguageDetectionJobProperties = "DominantLanguageDetectionJobProperties"
        }
    }

    public struct DescribeEndpointRequest: AWSEncodableShape {
        /// The Amazon Resource Number (ARN) of the endpoint being described.
        public let endpointArn: String

        public init(endpointArn: String) {
            self.endpointArn = endpointArn
        }

        public func validate(name: String) throws {
            try self.validate(self.endpointArn, name: "endpointArn", parent: name, max: 256)
            try self.validate(self.endpointArn, name: "endpointArn", parent: name, pattern: "^arn:aws(-[^:]+)?:comprehend:[a-zA-Z0-9-]*:[0-9]{12}:(document-classifier-endpoint|entity-recognizer-endpoint)/[a-zA-Z0-9](-*[a-zA-Z0-9])*$")
        }

        private enum CodingKeys: String, CodingKey {
            case endpointArn = "EndpointArn"
        }
    }

    public struct DescribeEndpointResponse: AWSDecodableShape {
        /// Describes information associated with the specific endpoint.
        public let endpointProperties: EndpointProperties?

        public init(endpointProperties: EndpointProperties? = nil) {
            self.endpointProperties = endpointProperties
        }

        private enum CodingKeys: String, CodingKey {
            case endpointProperties = "EndpointProperties"
        }
    }

    public struct DescribeEntitiesDetectionJobRequest: AWSEncodableShape {
        /// The identifier that Amazon Comprehend generated for the job. The  operation returns this identifier in its response.
        public let jobId: String

        public init(jobId: String) {
            self.jobId = jobId
        }

        public func validate(name: String) throws {
            try self.validate(self.jobId, name: "jobId", parent: name, max: 32)
            try self.validate(self.jobId, name: "jobId", parent: name, min: 1)
            try self.validate(self.jobId, name: "jobId", parent: name, pattern: "^([\\p{L}\\p{Z}\\p{N}_.:/=+\\-%@]*)$")
        }

        private enum CodingKeys: String, CodingKey {
            case jobId = "JobId"
        }
    }

    public struct DescribeEntitiesDetectionJobResponse: AWSDecodableShape {
        /// An object that contains the properties associated with an entities detection job.
        public let entitiesDetectionJobProperties: EntitiesDetectionJobProperties?

        public init(entitiesDetectionJobProperties: EntitiesDetectionJobProperties? = nil) {
            self.entitiesDetectionJobProperties = entitiesDetectionJobProperties
        }

        private enum CodingKeys: String, CodingKey {
            case entitiesDetectionJobProperties = "EntitiesDetectionJobProperties"
        }
    }

    public struct DescribeEntityRecognizerRequest: AWSEncodableShape {
        /// The Amazon Resource Name (ARN) that identifies the entity recognizer.
        public let entityRecognizerArn: String

        public init(entityRecognizerArn: String) {
            self.entityRecognizerArn = entityRecognizerArn
        }

        public func validate(name: String) throws {
            try self.validate(self.entityRecognizerArn, name: "entityRecognizerArn", parent: name, max: 256)
            try self.validate(self.entityRecognizerArn, name: "entityRecognizerArn", parent: name, pattern: "^arn:aws(-[^:]+)?:comprehend:[a-zA-Z0-9-]*:[0-9]{12}:entity-recognizer/[a-zA-Z0-9](-*[a-zA-Z0-9])*(/version/[a-zA-Z0-9](-*[a-zA-Z0-9])*)?$")
        }

        private enum CodingKeys: String, CodingKey {
            case entityRecognizerArn = "EntityRecognizerArn"
        }
    }

    public struct DescribeEntityRecognizerResponse: AWSDecodableShape {
        /// Describes information associated with an entity recognizer.
        public let entityRecognizerProperties: EntityRecognizerProperties?

        public init(entityRecognizerProperties: EntityRecognizerProperties? = nil) {
            self.entityRecognizerProperties = entityRecognizerProperties
        }

        private enum CodingKeys: String, CodingKey {
            case entityRecognizerProperties = "EntityRecognizerProperties"
        }
    }

    public struct DescribeEventsDetectionJobRequest: AWSEncodableShape {
        /// The identifier of the events detection job.
        public let jobId: String

        public init(jobId: String) {
            self.jobId = jobId
        }

        public func validate(name: String) throws {
            try self.validate(self.jobId, name: "jobId", parent: name, max: 32)
            try self.validate(self.jobId, name: "jobId", parent: name, min: 1)
            try self.validate(self.jobId, name: "jobId", parent: name, pattern: "^([\\p{L}\\p{Z}\\p{N}_.:/=+\\-%@]*)$")
        }

        private enum CodingKeys: String, CodingKey {
            case jobId = "JobId"
        }
    }

    public struct DescribeEventsDetectionJobResponse: AWSDecodableShape {
        /// An object that contains the properties associated with an event detection job.
        public let eventsDetectionJobProperties: EventsDetectionJobProperties?

        public init(eventsDetectionJobProperties: EventsDetectionJobProperties? = nil) {
            self.eventsDetectionJobProperties = eventsDetectionJobProperties
        }

        private enum CodingKeys: String, CodingKey {
            case eventsDetectionJobProperties = "EventsDetectionJobProperties"
        }
    }

    public struct DescribeKeyPhrasesDetectionJobRequest: AWSEncodableShape {
        /// The identifier that Amazon Comprehend generated for the job. The  operation returns this identifier in its response.
        public let jobId: String

        public init(jobId: String) {
            self.jobId = jobId
        }

        public func validate(name: String) throws {
            try self.validate(self.jobId, name: "jobId", parent: name, max: 32)
            try self.validate(self.jobId, name: "jobId", parent: name, min: 1)
            try self.validate(self.jobId, name: "jobId", parent: name, pattern: "^([\\p{L}\\p{Z}\\p{N}_.:/=+\\-%@]*)$")
        }

        private enum CodingKeys: String, CodingKey {
            case jobId = "JobId"
        }
    }

    public struct DescribeKeyPhrasesDetectionJobResponse: AWSDecodableShape {
        /// An object that contains the properties associated with a key phrases detection job.
        public let keyPhrasesDetectionJobProperties: KeyPhrasesDetectionJobProperties?

        public init(keyPhrasesDetectionJobProperties: KeyPhrasesDetectionJobProperties? = nil) {
            self.keyPhrasesDetectionJobProperties = keyPhrasesDetectionJobProperties
        }

        private enum CodingKeys: String, CodingKey {
            case keyPhrasesDetectionJobProperties = "KeyPhrasesDetectionJobProperties"
        }
    }

    public struct DescribePiiEntitiesDetectionJobRequest: AWSEncodableShape {
        /// The identifier that Amazon Comprehend generated for the job. The  operation returns this identifier in its response.
        public let jobId: String

        public init(jobId: String) {
            self.jobId = jobId
        }

        public func validate(name: String) throws {
            try self.validate(self.jobId, name: "jobId", parent: name, max: 32)
            try self.validate(self.jobId, name: "jobId", parent: name, min: 1)
            try self.validate(self.jobId, name: "jobId", parent: name, pattern: "^([\\p{L}\\p{Z}\\p{N}_.:/=+\\-%@]*)$")
        }

        private enum CodingKeys: String, CodingKey {
            case jobId = "JobId"
        }
    }

    public struct DescribePiiEntitiesDetectionJobResponse: AWSDecodableShape {
        public let piiEntitiesDetectionJobProperties: PiiEntitiesDetectionJobProperties?

        public init(piiEntitiesDetectionJobProperties: PiiEntitiesDetectionJobProperties? = nil) {
            self.piiEntitiesDetectionJobProperties = piiEntitiesDetectionJobProperties
        }

        private enum CodingKeys: String, CodingKey {
            case piiEntitiesDetectionJobProperties = "PiiEntitiesDetectionJobProperties"
        }
    }

    public struct DescribeResourcePolicyRequest: AWSEncodableShape {
        /// The Amazon Resource Name (ARN) of the custom model version that has the resource policy.
        public let resourceArn: String

        public init(resourceArn: String) {
            self.resourceArn = resourceArn
        }

        public func validate(name: String) throws {
            try self.validate(self.resourceArn, name: "resourceArn", parent: name, max: 256)
            try self.validate(self.resourceArn, name: "resourceArn", parent: name, pattern: "^arn:aws(-[^:]+)?:comprehend:[a-zA-Z0-9-]*:[0-9]{12}:(document-classifier|entity-recognizer)/[a-zA-Z0-9](-*[a-zA-Z0-9])*(/version/[a-zA-Z0-9](-*[a-zA-Z0-9])*)?$")
        }

        private enum CodingKeys: String, CodingKey {
            case resourceArn = "ResourceArn"
        }
    }

    public struct DescribeResourcePolicyResponse: AWSDecodableShape {
        /// The time at which the policy was created.
        public let creationTime: Date?
        /// The time at which the policy was last modified.
        public let lastModifiedTime: Date?
        /// The revision ID of the policy. Each time you modify a policy, Amazon Comprehend assigns a new revision ID, and it deletes the prior version of the policy.
        public let policyRevisionId: String?
        /// The JSON body of the resource-based policy.
        public let resourcePolicy: String?

        public init(creationTime: Date? = nil, lastModifiedTime: Date? = nil, policyRevisionId: String? = nil, resourcePolicy: String? = nil) {
            self.creationTime = creationTime
            self.lastModifiedTime = lastModifiedTime
            self.policyRevisionId = policyRevisionId
            self.resourcePolicy = resourcePolicy
        }

        private enum CodingKeys: String, CodingKey {
            case creationTime = "CreationTime"
            case lastModifiedTime = "LastModifiedTime"
            case policyRevisionId = "PolicyRevisionId"
            case resourcePolicy = "ResourcePolicy"
        }
    }

    public struct DescribeSentimentDetectionJobRequest: AWSEncodableShape {
        /// The identifier that Amazon Comprehend generated for the job. The  operation returns this identifier in its response.
        public let jobId: String

        public init(jobId: String) {
            self.jobId = jobId
        }

        public func validate(name: String) throws {
            try self.validate(self.jobId, name: "jobId", parent: name, max: 32)
            try self.validate(self.jobId, name: "jobId", parent: name, min: 1)
            try self.validate(self.jobId, name: "jobId", parent: name, pattern: "^([\\p{L}\\p{Z}\\p{N}_.:/=+\\-%@]*)$")
        }

        private enum CodingKeys: String, CodingKey {
            case jobId = "JobId"
        }
    }

    public struct DescribeSentimentDetectionJobResponse: AWSDecodableShape {
        /// An object that contains the properties associated with a sentiment detection job.
        public let sentimentDetectionJobProperties: SentimentDetectionJobProperties?

        public init(sentimentDetectionJobProperties: SentimentDetectionJobProperties? = nil) {
            self.sentimentDetectionJobProperties = sentimentDetectionJobProperties
        }

        private enum CodingKeys: String, CodingKey {
            case sentimentDetectionJobProperties = "SentimentDetectionJobProperties"
        }
    }

    public struct DescribeTargetedSentimentDetectionJobRequest: AWSEncodableShape {
        /// The identifier that Amazon Comprehend generated for the job. The  operation returns this identifier in its response.
        public let jobId: String

        public init(jobId: String) {
            self.jobId = jobId
        }

        public func validate(name: String) throws {
            try self.validate(self.jobId, name: "jobId", parent: name, max: 32)
            try self.validate(self.jobId, name: "jobId", parent: name, min: 1)
            try self.validate(self.jobId, name: "jobId", parent: name, pattern: "^([\\p{L}\\p{Z}\\p{N}_.:/=+\\-%@]*)$")
        }

        private enum CodingKeys: String, CodingKey {
            case jobId = "JobId"
        }
    }

    public struct DescribeTargetedSentimentDetectionJobResponse: AWSDecodableShape {
        /// An object that contains the properties associated with a targeted sentiment detection job.
        public let targetedSentimentDetectionJobProperties: TargetedSentimentDetectionJobProperties?

        public init(targetedSentimentDetectionJobProperties: TargetedSentimentDetectionJobProperties? = nil) {
            self.targetedSentimentDetectionJobProperties = targetedSentimentDetectionJobProperties
        }

        private enum CodingKeys: String, CodingKey {
            case targetedSentimentDetectionJobProperties = "TargetedSentimentDetectionJobProperties"
        }
    }

    public struct DescribeTopicsDetectionJobRequest: AWSEncodableShape {
        /// The identifier assigned by the user to the detection job.
        public let jobId: String

        public init(jobId: String) {
            self.jobId = jobId
        }

        public func validate(name: String) throws {
            try self.validate(self.jobId, name: "jobId", parent: name, max: 32)
            try self.validate(self.jobId, name: "jobId", parent: name, min: 1)
            try self.validate(self.jobId, name: "jobId", parent: name, pattern: "^([\\p{L}\\p{Z}\\p{N}_.:/=+\\-%@]*)$")
        }

        private enum CodingKeys: String, CodingKey {
            case jobId = "JobId"
        }
    }

    public struct DescribeTopicsDetectionJobResponse: AWSDecodableShape {
        /// The list of properties for the requested job.
        public let topicsDetectionJobProperties: TopicsDetectionJobProperties?

        public init(topicsDetectionJobProperties: TopicsDetectionJobProperties? = nil) {
            self.topicsDetectionJobProperties = topicsDetectionJobProperties
        }

        private enum CodingKeys: String, CodingKey {
            case topicsDetectionJobProperties = "TopicsDetectionJobProperties"
        }
    }

    public struct DetectDominantLanguageRequest: AWSEncodableShape {
        /// A UTF-8 text string. The string must contain at least 20 characters. The maximum string size is 100 KB.
        public let text: String

        public init(text: String) {
            self.text = text
        }

        public func validate(name: String) throws {
            try self.validate(self.text, name: "text", parent: name, min: 1)
        }

        private enum CodingKeys: String, CodingKey {
            case text = "Text"
        }
    }

    public struct DetectDominantLanguageResponse: AWSDecodableShape {
        /// The languages that Amazon Comprehend detected in the input text. For each language, the response returns the RFC 5646 language code and the level of confidence that Amazon Comprehend has in the accuracy of its inference. For more information about RFC 5646, see Tags for Identifying Languages on the IETF Tools web site.
        public let languages: [DominantLanguage]?

        public init(languages: [DominantLanguage]? = nil) {
            self.languages = languages
        }

        private enum CodingKeys: String, CodingKey {
            case languages = "Languages"
        }
    }

    public struct DetectEntitiesRequest: AWSEncodableShape {
        /// This field applies only when you use a custom entity recognition model that was trained with PDF annotations. For other cases,   enter your text input in the Text field.      Use the Bytes parameter to input a text, PDF, Word or image file. Using a plain-text file in the Bytes parameter is equivelent to using the  Text parameter (the Entities field in the response is identical). You can also use the Bytes parameter to input an Amazon Textract DetectDocumentText  or AnalyzeDocument output file. Provide the input document as a sequence of base64-encoded bytes.  If your code uses an Amazon Web Services SDK to detect entities, the SDK may encode  the document file bytes for you.  The maximum length of this field depends on the input document type. For details, see  Inputs for real-time custom analysis in the Comprehend Developer Guide.  If you use the Bytes parameter, do not use the Text parameter.
        public let bytes: AWSBase64Data?
        /// Provides configuration parameters to override the default actions for extracting text  from PDF documents and image files.
        public let documentReaderConfig: DocumentReaderConfig?
        /// The Amazon Resource Name of an endpoint that is associated with a custom entity recognition model. Provide an endpoint if you want to detect entities by using your own custom model instead of the default model that is used by Amazon Comprehend. If you specify an endpoint, Amazon Comprehend uses the language of your custom model, and it ignores any language code that you provide in your request. For information about endpoints, see Managing endpoints.
        public let endpointArn: String?
        /// The language of the input documents. You can specify any of the primary languages supported by Amazon Comprehend. If your request includes the endpoint for a custom entity recognition model, Amazon Comprehend uses the language of your custom model, and it ignores any language code that you specify here. All input documents must be in the same language.
        public let languageCode: LanguageCode?
        /// A UTF-8 text string. The maximum string size is 100 KB. If you enter text using this parameter, do not use the Bytes parameter.
        public let text: String?

        public init(bytes: AWSBase64Data? = nil, documentReaderConfig: DocumentReaderConfig? = nil, endpointArn: String? = nil, languageCode: LanguageCode? = nil, text: String? = nil) {
            self.bytes = bytes
            self.documentReaderConfig = documentReaderConfig
            self.endpointArn = endpointArn
            self.languageCode = languageCode
            self.text = text
        }

        public func validate(name: String) throws {
            try self.validate(self.bytes, name: "bytes", parent: name, min: 1)
            try self.documentReaderConfig?.validate(name: "\(name).documentReaderConfig")
            try self.validate(self.endpointArn, name: "endpointArn", parent: name, max: 256)
            try self.validate(self.endpointArn, name: "endpointArn", parent: name, pattern: "^arn:aws(-[^:]+)?:comprehend:[a-zA-Z0-9-]*:[0-9]{12}:entity-recognizer-endpoint/[a-zA-Z0-9](-*[a-zA-Z0-9])*$")
            try self.validate(self.text, name: "text", parent: name, min: 1)
        }

        private enum CodingKeys: String, CodingKey {
            case bytes = "Bytes"
            case documentReaderConfig = "DocumentReaderConfig"
            case endpointArn = "EndpointArn"
            case languageCode = "LanguageCode"
            case text = "Text"
        }
    }

    public struct DetectEntitiesResponse: AWSDecodableShape {
        /// Information about each block of text in the input document.    Blocks are nested. A page block contains a block for each line of text,  which contains a block for each word.  The Block content for a Word input document does not include a Geometry field. The Block field is not present in the response for plain-text inputs.
        public let blocks: [Block]?
        /// Information about the document, discovered during text extraction. This field is present in the response only if your request used the Byte parameter.
        public let documentMetadata: DocumentMetadata?
        /// The document type for each page in the input document. This field is present in the response only if your request used the Byte parameter.
        public let documentType: [DocumentTypeListItem]?
        /// A collection of entities identified in the input text. For each entity, the response provides the entity text, entity type, where the entity text begins and ends, and the level of confidence that Amazon Comprehend has in the detection.  If your request uses a custom entity recognition model, Amazon Comprehend detects the entities that the model is trained to recognize. Otherwise, it detects the default entity types. For a list of default entity types, see Entities in the Comprehend Developer Guide.
        public let entities: [Entity]?
        /// Page-level errors that the system detected while processing the input document.  The field is empty if the system encountered no errors.
        public let errors: [ErrorsListItem]?

        public init(blocks: [Block]? = nil, documentMetadata: DocumentMetadata? = nil, documentType: [DocumentTypeListItem]? = nil, entities: [Entity]? = nil, errors: [ErrorsListItem]? = nil) {
            self.blocks = blocks
            self.documentMetadata = documentMetadata
            self.documentType = documentType
            self.entities = entities
            self.errors = errors
        }

        private enum CodingKeys: String, CodingKey {
            case blocks = "Blocks"
            case documentMetadata = "DocumentMetadata"
            case documentType = "DocumentType"
            case entities = "Entities"
            case errors = "Errors"
        }
    }

    public struct DetectKeyPhrasesRequest: AWSEncodableShape {
        /// The language of the input documents. You can specify any of the primary languages supported by Amazon Comprehend. All documents must be in the same language.
        public let languageCode: LanguageCode
        /// A UTF-8 text string. The string must contain less than 100 KB of UTF-8 encoded characters.
        public let text: String

        public init(languageCode: LanguageCode, text: String) {
            self.languageCode = languageCode
            self.text = text
        }

        public func validate(name: String) throws {
            try self.validate(self.text, name: "text", parent: name, min: 1)
        }

        private enum CodingKeys: String, CodingKey {
            case languageCode = "LanguageCode"
            case text = "Text"
        }
    }

    public struct DetectKeyPhrasesResponse: AWSDecodableShape {
        /// A collection of key phrases that Amazon Comprehend identified in the input text. For each key phrase, the response provides the text of the key phrase, where the key phrase begins and ends, and the level of confidence that Amazon Comprehend has in the accuracy of the detection.
        public let keyPhrases: [KeyPhrase]?

        public init(keyPhrases: [KeyPhrase]? = nil) {
            self.keyPhrases = keyPhrases
        }

        private enum CodingKeys: String, CodingKey {
            case keyPhrases = "KeyPhrases"
        }
    }

    public struct DetectPiiEntitiesRequest: AWSEncodableShape {
        /// The language of the input documents. Currently, English is the only valid language.
        public let languageCode: LanguageCode
        /// A UTF-8 text string. The maximum string size is 100 KB.
        public let text: String

        public init(languageCode: LanguageCode, text: String) {
            self.languageCode = languageCode
            self.text = text
        }

        public func validate(name: String) throws {
            try self.validate(self.text, name: "text", parent: name, min: 1)
        }

        private enum CodingKeys: String, CodingKey {
            case languageCode = "LanguageCode"
            case text = "Text"
        }
    }

    public struct DetectPiiEntitiesResponse: AWSDecodableShape {
        /// A collection of PII entities identified in the input text. For each entity, the response provides the entity type, where the entity text begins and ends, and the level of confidence that Amazon Comprehend has in the detection.
        public let entities: [PiiEntity]?

        public init(entities: [PiiEntity]? = nil) {
            self.entities = entities
        }

        private enum CodingKeys: String, CodingKey {
            case entities = "Entities"
        }
    }

    public struct DetectSentimentRequest: AWSEncodableShape {
        /// The language of the input documents. You can specify any of the primary languages supported by Amazon Comprehend. All documents must be in the same language.
        public let languageCode: LanguageCode
        /// A UTF-8 text string. The maximum string size is 5 KB.  Amazon Comprehend performs real-time sentiment analysis on the first 500 characters of the input text and ignores any additional text in the input.
        public let text: String

        public init(languageCode: LanguageCode, text: String) {
            self.languageCode = languageCode
            self.text = text
        }

        public func validate(name: String) throws {
            try self.validate(self.text, name: "text", parent: name, min: 1)
        }

        private enum CodingKeys: String, CodingKey {
            case languageCode = "LanguageCode"
            case text = "Text"
        }
    }

    public struct DetectSentimentResponse: AWSDecodableShape {
        /// The inferred sentiment that Amazon Comprehend has the highest level of confidence in.
        public let sentiment: SentimentType?
        /// An object that lists the sentiments, and their corresponding confidence levels.
        public let sentimentScore: SentimentScore?

        public init(sentiment: SentimentType? = nil, sentimentScore: SentimentScore? = nil) {
            self.sentiment = sentiment
            self.sentimentScore = sentimentScore
        }

        private enum CodingKeys: String, CodingKey {
            case sentiment = "Sentiment"
            case sentimentScore = "SentimentScore"
        }
    }

    public struct DetectSyntaxRequest: AWSEncodableShape {
        /// The language code of the input documents. You can specify any of the following languages supported by Amazon Comprehend: German ("de"), English ("en"), Spanish ("es"), French ("fr"), Italian ("it"), or Portuguese ("pt").
        public let languageCode: SyntaxLanguageCode
        /// A UTF-8 string. The maximum string size is 5 KB.
        public let text: String

        public init(languageCode: SyntaxLanguageCode, text: String) {
            self.languageCode = languageCode
            self.text = text
        }

        public func validate(name: String) throws {
            try self.validate(self.text, name: "text", parent: name, min: 1)
        }

        private enum CodingKeys: String, CodingKey {
            case languageCode = "LanguageCode"
            case text = "Text"
        }
    }

    public struct DetectSyntaxResponse: AWSDecodableShape {
        /// A collection of syntax tokens describing the text. For each token, the response provides the text, the token type, where the text begins and ends, and the level of confidence that Amazon Comprehend has that the token is correct. For a list of token types, see Syntax in the Comprehend Developer Guide.
        public let syntaxTokens: [SyntaxToken]?

        public init(syntaxTokens: [SyntaxToken]? = nil) {
            self.syntaxTokens = syntaxTokens
        }

        private enum CodingKeys: String, CodingKey {
            case syntaxTokens = "SyntaxTokens"
        }
    }

    public struct DetectTargetedSentimentRequest: AWSEncodableShape {
        /// The language of the input documents. Currently, English is the only supported language.
        public let languageCode: LanguageCode
        /// A UTF-8 text string. The maximum string length is 5 KB.
        public let text: String

        public init(languageCode: LanguageCode, text: String) {
            self.languageCode = languageCode
            self.text = text
        }

        public func validate(name: String) throws {
            try self.validate(self.text, name: "text", parent: name, min: 1)
        }

        private enum CodingKeys: String, CodingKey {
            case languageCode = "LanguageCode"
            case text = "Text"
        }
    }

    public struct DetectTargetedSentimentResponse: AWSDecodableShape {
        /// Targeted sentiment analysis for each of the entities identified in the input text.
        public let entities: [TargetedSentimentEntity]?

        public init(entities: [TargetedSentimentEntity]? = nil) {
            self.entities = entities
        }

        private enum CodingKeys: String, CodingKey {
            case entities = "Entities"
        }
    }

    public struct DocumentClass: AWSDecodableShape {
        /// The name of the class.
        public let name: String?
        /// Page number in the input document. This field is present in the response only if your request includes the Byte parameter.
        public let page: Int?
        /// The confidence score that Amazon Comprehend has this class correctly attributed.
        public let score: Float?

        public init(name: String? = nil, page: Int? = nil, score: Float? = nil) {
            self.name = name
            self.page = page
            self.score = score
        }

        private enum CodingKeys: String, CodingKey {
            case name = "Name"
            case page = "Page"
            case score = "Score"
        }
    }

    public struct DocumentClassificationJobFilter: AWSEncodableShape {
        /// Filters on the name of the job.
        public let jobName: String?
        /// Filters the list based on job status. Returns only jobs with the specified status.
        public let jobStatus: JobStatus?
        /// Filters the list of jobs based on the time that the job was submitted for processing. Returns only jobs submitted after the specified time. Jobs are returned in descending order, newest to oldest.
        public let submitTimeAfter: Date?
        /// Filters the list of jobs based on the time that the job was submitted for processing. Returns only jobs submitted before the specified time. Jobs are returned in ascending order, oldest to newest.
        public let submitTimeBefore: Date?

        public init(jobName: String? = nil, jobStatus: JobStatus? = nil, submitTimeAfter: Date? = nil, submitTimeBefore: Date? = nil) {
            self.jobName = jobName
            self.jobStatus = jobStatus
            self.submitTimeAfter = submitTimeAfter
            self.submitTimeBefore = submitTimeBefore
        }

        public func validate(name: String) throws {
            try self.validate(self.jobName, name: "jobName", parent: name, max: 256)
            try self.validate(self.jobName, name: "jobName", parent: name, min: 1)
            try self.validate(self.jobName, name: "jobName", parent: name, pattern: "^([\\p{L}\\p{Z}\\p{N}_.:/=+\\-%@]*)$")
        }

        private enum CodingKeys: String, CodingKey {
            case jobName = "JobName"
            case jobStatus = "JobStatus"
            case submitTimeAfter = "SubmitTimeAfter"
            case submitTimeBefore = "SubmitTimeBefore"
        }
    }

    public struct DocumentClassificationJobProperties: AWSDecodableShape {
        /// The Amazon Resource Name (ARN) of the AWS identity and Access Management (IAM) role that grants Amazon Comprehend read access to your input data.
        public let dataAccessRoleArn: String?
        /// The Amazon Resource Name (ARN) that identifies the document classifier.
        public let documentClassifierArn: String?
        /// The time that the document classification job completed.
        public let endTime: Date?
        /// The input data configuration that you supplied when you created the document classification job.
        public let inputDataConfig: InputDataConfig?
        /// The Amazon Resource Name (ARN) of the document classification job. It is a unique, fully qualified identifier for the job. It includes the AWS account, Region, and the job ID. The format of the ARN is as follows:  arn::comprehend:::document-classification-job/  The following is an example job ARN:  arn:aws:comprehend:us-west-2:111122223333:document-classification-job/1234abcd12ab34cd56ef1234567890ab
        public let jobArn: String?
        /// The identifier assigned to the document classification job.
        public let jobId: String?
        /// The name that you assigned to the document classification job.
        public let jobName: String?
        /// The current status of the document classification job. If the status is FAILED, the Message field shows the reason for the failure.
        public let jobStatus: JobStatus?
        /// A description of the status of the job.
        public let message: String?
        /// The output data configuration that you supplied when you created the document classification job.
        public let outputDataConfig: OutputDataConfig?
        /// The time that the document classification job was submitted for processing.
        public let submitTime: Date?
        /// ID for the AWS Key Management Service (KMS) key that Amazon Comprehend uses to encrypt data on the storage volume attached to the ML compute instance(s) that process the analysis job. The VolumeKmsKeyId can be either of the following formats:   KMS Key ID: "1234abcd-12ab-34cd-56ef-1234567890ab"    Amazon Resource Name (ARN) of a KMS Key: "arn:aws:kms:us-west-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab"
        public let volumeKmsKeyId: String?
        ///  Configuration parameters for a private Virtual Private Cloud (VPC) containing the resources you are using for your document classification job. For more information, see Amazon VPC.
        public let vpcConfig: VpcConfig?

        public init(dataAccessRoleArn: String? = nil, documentClassifierArn: String? = nil, endTime: Date? = nil, inputDataConfig: InputDataConfig? = nil, jobArn: String? = nil, jobId: String? = nil, jobName: String? = nil, jobStatus: JobStatus? = nil, message: String? = nil, outputDataConfig: OutputDataConfig? = nil, submitTime: Date? = nil, volumeKmsKeyId: String? = nil, vpcConfig: VpcConfig? = nil) {
            self.dataAccessRoleArn = dataAccessRoleArn
            self.documentClassifierArn = documentClassifierArn
            self.endTime = endTime
            self.inputDataConfig = inputDataConfig
            self.jobArn = jobArn
            self.jobId = jobId
            self.jobName = jobName
            self.jobStatus = jobStatus
            self.message = message
            self.outputDataConfig = outputDataConfig
            self.submitTime = submitTime
            self.volumeKmsKeyId = volumeKmsKeyId
            self.vpcConfig = vpcConfig
        }

        private enum CodingKeys: String, CodingKey {
            case dataAccessRoleArn = "DataAccessRoleArn"
            case documentClassifierArn = "DocumentClassifierArn"
            case endTime = "EndTime"
            case inputDataConfig = "InputDataConfig"
            case jobArn = "JobArn"
            case jobId = "JobId"
            case jobName = "JobName"
            case jobStatus = "JobStatus"
            case message = "Message"
            case outputDataConfig = "OutputDataConfig"
            case submitTime = "SubmitTime"
            case volumeKmsKeyId = "VolumeKmsKeyId"
            case vpcConfig = "VpcConfig"
        }
    }

    public struct DocumentClassifierFilter: AWSEncodableShape {
        /// The name that you assigned to the document classifier
        public let documentClassifierName: String?
        /// Filters the list of classifiers based on status.
        public let status: ModelStatus?
        /// Filters the list of classifiers based on the time that the classifier was submitted for processing. Returns only classifiers submitted after the specified time. Classifiers are returned in descending order, newest to oldest.
        public let submitTimeAfter: Date?
        /// Filters the list of classifiers based on the time that the classifier was submitted for processing. Returns only classifiers submitted before the specified time. Classifiers are returned in ascending order, oldest to newest.
        public let submitTimeBefore: Date?

        public init(documentClassifierName: String? = nil, status: ModelStatus? = nil, submitTimeAfter: Date? = nil, submitTimeBefore: Date? = nil) {
            self.documentClassifierName = documentClassifierName
            self.status = status
            self.submitTimeAfter = submitTimeAfter
            self.submitTimeBefore = submitTimeBefore
        }

        public func validate(name: String) throws {
            try self.validate(self.documentClassifierName, name: "documentClassifierName", parent: name, max: 63)
            try self.validate(self.documentClassifierName, name: "documentClassifierName", parent: name, pattern: "^[a-zA-Z0-9](-*[a-zA-Z0-9])*$")
        }

        private enum CodingKeys: String, CodingKey {
            case documentClassifierName = "DocumentClassifierName"
            case status = "Status"
            case submitTimeAfter = "SubmitTimeAfter"
            case submitTimeBefore = "SubmitTimeBefore"
        }
    }

    public struct DocumentClassifierInputDataConfig: AWSEncodableShape & AWSDecodableShape {
        /// A list of augmented manifest files that provide training data for your custom model. An augmented manifest file is a labeled dataset that is produced by Amazon SageMaker Ground Truth. This parameter is required if you set DataFormat to AUGMENTED_MANIFEST.
        public let augmentedManifests: [AugmentedManifestsListItem]?
        /// The format of your training data:    COMPREHEND_CSV: A two-column CSV file, where labels are provided in the first column, and documents are provided in the second. If you use this value, you must provide the S3Uri parameter in your request.    AUGMENTED_MANIFEST: A labeled dataset that is produced by Amazon SageMaker Ground Truth. This file is in JSON lines format. Each line is a complete JSON object that contains a training document and its associated labels.  If you use this value, you must provide the AugmentedManifests parameter in your request.   If you don't specify a value, Amazon Comprehend uses COMPREHEND_CSV as the default.
        public let dataFormat: DocumentClassifierDataFormat?
        /// Indicates the delimiter used to separate each label for training a multi-label classifier. The default delimiter between labels is a pipe (|). You can use a different character as a delimiter (if it's an allowed character) by specifying it under Delimiter for labels. If the training documents use a delimiter other than the default or the delimiter you specify, the labels on that line will be combined to make a single unique label, such as LABELLABELLABEL.
        public let labelDelimiter: String?
        /// The Amazon S3 URI for the input data. The S3 bucket must be in the same region as the API endpoint that you are calling. The URI can point to a single input file or it can provide the prefix for a collection of input files. For example, if you use the URI S3://bucketName/prefix, if the prefix is a single file, Amazon Comprehend uses that file as input. If more than one file begins with the prefix, Amazon Comprehend uses all of them as input. This parameter is required if you set DataFormat to COMPREHEND_CSV.
        public let s3Uri: String?
        /// This specifies the Amazon S3 location where the test annotations for an entity recognizer are located. The URI must be in the same AWS Region as the API endpoint that you are calling.
        public let testS3Uri: String?

        public init(augmentedManifests: [AugmentedManifestsListItem]? = nil, dataFormat: DocumentClassifierDataFormat? = nil, labelDelimiter: String? = nil, s3Uri: String? = nil, testS3Uri: String? = nil) {
            self.augmentedManifests = augmentedManifests
            self.dataFormat = dataFormat
            self.labelDelimiter = labelDelimiter
            self.s3Uri = s3Uri
            self.testS3Uri = testS3Uri
        }

        public func validate(name: String) throws {
            try self.augmentedManifests?.forEach {
                try $0.validate(name: "\(name).augmentedManifests[]")
            }
            try self.validate(self.labelDelimiter, name: "labelDelimiter", parent: name, max: 1)
            try self.validate(self.labelDelimiter, name: "labelDelimiter", parent: name, min: 1)
            try self.validate(self.labelDelimiter, name: "labelDelimiter", parent: name, pattern: "^[ ~!@#$%^*\\-_+=|\\\\:;\\t>?/]$")
            try self.validate(self.s3Uri, name: "s3Uri", parent: name, max: 1024)
            try self.validate(self.s3Uri, name: "s3Uri", parent: name, pattern: "^s3://[a-z0-9][\\.\\-a-z0-9]{1,61}[a-z0-9](/.*)?$")
            try self.validate(self.testS3Uri, name: "testS3Uri", parent: name, max: 1024)
            try self.validate(self.testS3Uri, name: "testS3Uri", parent: name, pattern: "^s3://[a-z0-9][\\.\\-a-z0-9]{1,61}[a-z0-9](/.*)?$")
        }

        private enum CodingKeys: String, CodingKey {
            case augmentedManifests = "AugmentedManifests"
            case dataFormat = "DataFormat"
            case labelDelimiter = "LabelDelimiter"
            case s3Uri = "S3Uri"
            case testS3Uri = "TestS3Uri"
        }
    }

    public struct DocumentClassifierOutputDataConfig: AWSEncodableShape & AWSDecodableShape {
        /// ID for the AWS Key Management Service (KMS) key that Amazon Comprehend uses to encrypt the output results from an analysis job. The KmsKeyId can be one of the following formats:   KMS Key ID: "1234abcd-12ab-34cd-56ef-1234567890ab"    Amazon Resource Name (ARN) of a KMS Key: "arn:aws:kms:us-west-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab"    KMS Key Alias: "alias/ExampleAlias"    ARN of a KMS Key Alias: "arn:aws:kms:us-west-2:111122223333:alias/ExampleAlias"
        public let kmsKeyId: String?
        /// When you use the OutputDataConfig object while creating a custom classifier, you specify the Amazon S3 location where you want to write the confusion matrix. The URI must be in the same region as the API endpoint that you are calling. The location is used as the prefix for the actual location of this output file. When the custom classifier job is finished, the service creates the output file in a directory specific to the job. The S3Uri field contains the location of the output file, called output.tar.gz. It is a compressed archive that contains the confusion matrix.
        public let s3Uri: String?

        public init(kmsKeyId: String? = nil, s3Uri: String? = nil) {
            self.kmsKeyId = kmsKeyId
            self.s3Uri = s3Uri
        }

        public func validate(name: String) throws {
            try self.validate(self.kmsKeyId, name: "kmsKeyId", parent: name, max: 2048)
            try self.validate(self.kmsKeyId, name: "kmsKeyId", parent: name, pattern: "^\\p{ASCII}+$")
            try self.validate(self.s3Uri, name: "s3Uri", parent: name, max: 1024)
            try self.validate(self.s3Uri, name: "s3Uri", parent: name, pattern: "^s3://[a-z0-9][\\.\\-a-z0-9]{1,61}[a-z0-9](/.*)?$")
        }

        private enum CodingKeys: String, CodingKey {
            case kmsKeyId = "KmsKeyId"
            case s3Uri = "S3Uri"
        }
    }

    public struct DocumentClassifierProperties: AWSDecodableShape {
        /// Information about the document classifier, including the number of documents used for training the classifier, the number of documents used for test the classifier, and an accuracy rating.
        public let classifierMetadata: ClassifierMetadata?
        /// The Amazon Resource Name (ARN) of the AWS Identity and Management (IAM) role that grants Amazon Comprehend read access to your input data.
        public let dataAccessRoleArn: String?
        /// The Amazon Resource Name (ARN) that identifies the document classifier.
        public let documentClassifierArn: String?
        /// The time that training the document classifier completed.
        public let endTime: Date?
        /// The input data configuration that you supplied when you created the document classifier for training.
        public let inputDataConfig: DocumentClassifierInputDataConfig?
        /// The language code for the language of the documents that the classifier was trained on.
        public let languageCode: LanguageCode?
        /// Additional information about the status of the classifier.
        public let message: String?
        /// Indicates the mode in which the specific classifier was trained. This also indicates the format of input documents and the format of the confusion matrix. Each classifier can only be trained in one mode and this cannot be changed once the classifier is trained.
        public let mode: DocumentClassifierMode?
        /// ID for the AWS Key Management Service (KMS) key that Amazon Comprehend uses to encrypt trained custom models. The ModelKmsKeyId can be either of the following formats:   KMS Key ID: "1234abcd-12ab-34cd-56ef-1234567890ab"    Amazon Resource Name (ARN) of a KMS Key: "arn:aws:kms:us-west-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab"
        public let modelKmsKeyId: String?
        ///  Provides output results configuration parameters for custom classifier jobs.
        public let outputDataConfig: DocumentClassifierOutputDataConfig?
        /// The Amazon Resource Name (ARN) of the source model. This model was imported from a different AWS account to create the document classifier model in your AWS account.
        public let sourceModelArn: String?
        /// The status of the document classifier. If the status is TRAINED the classifier is ready to use. If the status is FAILED you can see additional information about why the classifier wasn't trained in the Message field.
        public let status: ModelStatus?
        /// The time that the document classifier was submitted for training.
        public let submitTime: Date?
        /// The time that training of the document classifier was completed. Indicates the time when the training completes on documentation classifiers. You are billed for the time interval between this time and the value of TrainingStartTime.
        public let trainingEndTime: Date?
        /// Indicates the time when the training starts on documentation classifiers. You are billed for the time interval between this time and the value of TrainingEndTime.
        public let trainingStartTime: Date?
        /// The version name that you assigned to the document classifier.
        public let versionName: String?
        /// ID for the AWS Key Management Service (KMS) key that Amazon Comprehend uses to encrypt data on the storage volume attached to the ML compute instance(s) that process the analysis job. The VolumeKmsKeyId can be either of the following formats:   KMS Key ID: "1234abcd-12ab-34cd-56ef-1234567890ab"    Amazon Resource Name (ARN) of a KMS Key: "arn:aws:kms:us-west-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab"
        public let volumeKmsKeyId: String?
        ///  Configuration parameters for a private Virtual Private Cloud (VPC) containing the resources you are using for your custom classifier. For more information, see Amazon VPC.
        public let vpcConfig: VpcConfig?

        public init(classifierMetadata: ClassifierMetadata? = nil, dataAccessRoleArn: String? = nil, documentClassifierArn: String? = nil, endTime: Date? = nil, inputDataConfig: DocumentClassifierInputDataConfig? = nil, languageCode: LanguageCode? = nil, message: String? = nil, mode: DocumentClassifierMode? = nil, modelKmsKeyId: String? = nil, outputDataConfig: DocumentClassifierOutputDataConfig? = nil, sourceModelArn: String? = nil, status: ModelStatus? = nil, submitTime: Date? = nil, trainingEndTime: Date? = nil, trainingStartTime: Date? = nil, versionName: String? = nil, volumeKmsKeyId: String? = nil, vpcConfig: VpcConfig? = nil) {
            self.classifierMetadata = classifierMetadata
            self.dataAccessRoleArn = dataAccessRoleArn
            self.documentClassifierArn = documentClassifierArn
            self.endTime = endTime
            self.inputDataConfig = inputDataConfig
            self.languageCode = languageCode
            self.message = message
            self.mode = mode
            self.modelKmsKeyId = modelKmsKeyId
            self.outputDataConfig = outputDataConfig
            self.sourceModelArn = sourceModelArn
            self.status = status
            self.submitTime = submitTime
            self.trainingEndTime = trainingEndTime
            self.trainingStartTime = trainingStartTime
            self.versionName = versionName
            self.volumeKmsKeyId = volumeKmsKeyId
            self.vpcConfig = vpcConfig
        }

        private enum CodingKeys: String, CodingKey {
            case classifierMetadata = "ClassifierMetadata"
            case dataAccessRoleArn = "DataAccessRoleArn"
            case documentClassifierArn = "DocumentClassifierArn"
            case endTime = "EndTime"
            case inputDataConfig = "InputDataConfig"
            case languageCode = "LanguageCode"
            case message = "Message"
            case mode = "Mode"
            case modelKmsKeyId = "ModelKmsKeyId"
            case outputDataConfig = "OutputDataConfig"
            case sourceModelArn = "SourceModelArn"
            case status = "Status"
            case submitTime = "SubmitTime"
            case trainingEndTime = "TrainingEndTime"
            case trainingStartTime = "TrainingStartTime"
            case versionName = "VersionName"
            case volumeKmsKeyId = "VolumeKmsKeyId"
            case vpcConfig = "VpcConfig"
        }
    }

    public struct DocumentClassifierSummary: AWSDecodableShape {
        /// The name that you assigned the document classifier.
        public let documentClassifierName: String?
        /// The time that the latest document classifier version was submitted for processing.
        public let latestVersionCreatedAt: Date?
        /// The version name you assigned to the latest document classifier version.
        public let latestVersionName: String?
        /// Provides the status of the latest document classifier version.
        public let latestVersionStatus: ModelStatus?
        /// The number of versions you created.
        public let numberOfVersions: Int?

        public init(documentClassifierName: String? = nil, latestVersionCreatedAt: Date? = nil, latestVersionName: String? = nil, latestVersionStatus: ModelStatus? = nil, numberOfVersions: Int? = nil) {
            self.documentClassifierName = documentClassifierName
            self.latestVersionCreatedAt = latestVersionCreatedAt
            self.latestVersionName = latestVersionName
            self.latestVersionStatus = latestVersionStatus
            self.numberOfVersions = numberOfVersions
        }

        private enum CodingKeys: String, CodingKey {
            case documentClassifierName = "DocumentClassifierName"
            case latestVersionCreatedAt = "LatestVersionCreatedAt"
            case latestVersionName = "LatestVersionName"
            case latestVersionStatus = "LatestVersionStatus"
            case numberOfVersions = "NumberOfVersions"
        }
    }

    public struct DocumentLabel: AWSDecodableShape {
        /// The name of the label.
        public let name: String?
        /// Page number where the label occurs. This field is present in the response only if your request includes the Byte parameter.
        public let page: Int?
        /// The confidence score that Amazon Comprehend has this label correctly attributed.
        public let score: Float?

        public init(name: String? = nil, page: Int? = nil, score: Float? = nil) {
            self.name = name
            self.page = page
            self.score = score
        }

        private enum CodingKeys: String, CodingKey {
            case name = "Name"
            case page = "Page"
            case score = "Score"
        }
    }

    public struct DocumentMetadata: AWSDecodableShape {
        /// List of pages in the document, with the number of characters extracted from each page.
        public let extractedCharacters: [ExtractedCharactersListItem]?
        /// Number of pages in the document.
        public let pages: Int?

        public init(extractedCharacters: [ExtractedCharactersListItem]? = nil, pages: Int? = nil) {
            self.extractedCharacters = extractedCharacters
            self.pages = pages
        }

        private enum CodingKeys: String, CodingKey {
            case extractedCharacters = "ExtractedCharacters"
            case pages = "Pages"
        }
    }

    public struct DocumentReaderConfig: AWSEncodableShape & AWSDecodableShape {
        /// This field defines the Amazon Textract API operation that Amazon Comprehend uses to extract text from PDF files and image files. Enter one of the following values:    TEXTRACT_DETECT_DOCUMENT_TEXT - The Amazon Comprehend service uses the DetectDocumentText API operation.     TEXTRACT_ANALYZE_DOCUMENT - The Amazon Comprehend service uses the AnalyzeDocument   API operation.
        public let documentReadAction: DocumentReadAction
        /// Determines the text extraction actions for PDF files. Enter one of the following values:    SERVICE_DEFAULT - use the Amazon Comprehend service defaults for PDF files.    FORCE_DOCUMENT_READ_ACTION - Amazon Comprehend uses the Textract API specified by DocumentReadAction for all PDF files, including digital PDF files.
        public let documentReadMode: DocumentReadMode?
        /// Specifies the type of Amazon Textract features to apply. If you chose TEXTRACT_ANALYZE_DOCUMENT  as the read action, you must specify one or both of the following values:    TABLES - Returns information about any tables that are detected in the input document.     FORMS - Returns information and the data from any forms that are detected in the input document.
        public let featureTypes: [DocumentReadFeatureTypes]?

        public init(documentReadAction: DocumentReadAction, documentReadMode: DocumentReadMode? = nil, featureTypes: [DocumentReadFeatureTypes]? = nil) {
            self.documentReadAction = documentReadAction
            self.documentReadMode = documentReadMode
            self.featureTypes = featureTypes
        }

        public func validate(name: String) throws {
            try self.validate(self.featureTypes, name: "featureTypes", parent: name, max: 2)
            try self.validate(self.featureTypes, name: "featureTypes", parent: name, min: 1)
        }

        private enum CodingKeys: String, CodingKey {
            case documentReadAction = "DocumentReadAction"
            case documentReadMode = "DocumentReadMode"
            case featureTypes = "FeatureTypes"
        }
    }

    public struct DocumentTypeListItem: AWSDecodableShape {
        /// Page number.
        public let page: Int?
        /// Document type.
        public let type: DocumentType?

        public init(page: Int? = nil, type: DocumentType? = nil) {
            self.page = page
            self.type = type
        }

        private enum CodingKeys: String, CodingKey {
            case page = "Page"
            case type = "Type"
        }
    }

    public struct DominantLanguage: AWSDecodableShape {
        /// The RFC 5646 language code for the dominant language. For more information about RFC 5646, see Tags for Identifying Languages on the IETF Tools web site.
        public let languageCode: String?
        /// The level of confidence that Amazon Comprehend has in the accuracy of the detection.
        public let score: Float?

        public init(languageCode: String? = nil, score: Float? = nil) {
            self.languageCode = languageCode
            self.score = score
        }

        private enum CodingKeys: String, CodingKey {
            case languageCode = "LanguageCode"
            case score = "Score"
        }
    }

    public struct DominantLanguageDetectionJobFilter: AWSEncodableShape {
        /// Filters on the name of the job.
        public let jobName: String?
        /// Filters the list of jobs based on job status. Returns only jobs with the specified status.
        public let jobStatus: JobStatus?
        /// Filters the list of jobs based on the time that the job was submitted for processing. Returns only jobs submitted after the specified time. Jobs are returned in descending order, newest to oldest.
        public let submitTimeAfter: Date?
        /// Filters the list of jobs based on the time that the job was submitted for processing. Returns only jobs submitted before the specified time. Jobs are returned in ascending order, oldest to newest.
        public let submitTimeBefore: Date?

        public init(jobName: String? = nil, jobStatus: JobStatus? = nil, submitTimeAfter: Date? = nil, submitTimeBefore: Date? = nil) {
            self.jobName = jobName
            self.jobStatus = jobStatus
            self.submitTimeAfter = submitTimeAfter
            self.submitTimeBefore = submitTimeBefore
        }

        public func validate(name: String) throws {
            try self.validate(self.jobName, name: "jobName", parent: name, max: 256)
            try self.validate(self.jobName, name: "jobName", parent: name, min: 1)
            try self.validate(self.jobName, name: "jobName", parent: name, pattern: "^([\\p{L}\\p{Z}\\p{N}_.:/=+\\-%@]*)$")
        }

        private enum CodingKeys: String, CodingKey {
            case jobName = "JobName"
            case jobStatus = "JobStatus"
            case submitTimeAfter = "SubmitTimeAfter"
            case submitTimeBefore = "SubmitTimeBefore"
        }
    }

    public struct DominantLanguageDetectionJobProperties: AWSDecodableShape {
        /// The Amazon Resource Name (ARN) that gives Amazon Comprehend read access to your input data.
        public let dataAccessRoleArn: String?
        /// The time that the dominant language detection job completed.
        public let endTime: Date?
        /// The input data configuration that you supplied when you created the dominant language detection job.
        public let inputDataConfig: InputDataConfig?
        /// The Amazon Resource Name (ARN) of the dominant language detection job. It is a unique, fully qualified identifier for the job. It includes the AWS account, Region, and the job ID. The format of the ARN is as follows:  arn::comprehend:::dominant-language-detection-job/  The following is an example job ARN:  arn:aws:comprehend:us-west-2:111122223333:dominant-language-detection-job/1234abcd12ab34cd56ef1234567890ab
        public let jobArn: String?
        /// The identifier assigned to the dominant language detection job.
        public let jobId: String?
        /// The name that you assigned to the dominant language detection job.
        public let jobName: String?
        /// The current status of the dominant language detection job. If the status is FAILED, the Message field shows the reason for the failure.
        public let jobStatus: JobStatus?
        /// A description for the status of a job.
        public let message: String?
        /// The output data configuration that you supplied when you created the dominant language detection job.
        public let outputDataConfig: OutputDataConfig?
        /// The time that the dominant language detection job was submitted for processing.
        public let submitTime: Date?
        /// ID for the AWS Key Management Service (KMS) key that Amazon Comprehend uses to encrypt data on the storage volume attached to the ML compute instance(s) that process the analysis job. The VolumeKmsKeyId can be either of the following formats:   KMS Key ID: "1234abcd-12ab-34cd-56ef-1234567890ab"    Amazon Resource Name (ARN) of a KMS Key: "arn:aws:kms:us-west-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab"
        public let volumeKmsKeyId: String?
        ///  Configuration parameters for a private Virtual Private Cloud (VPC) containing the resources you are using for your dominant language detection job. For more information, see Amazon VPC.
        public let vpcConfig: VpcConfig?

        public init(dataAccessRoleArn: String? = nil, endTime: Date? = nil, inputDataConfig: InputDataConfig? = nil, jobArn: String? = nil, jobId: String? = nil, jobName: String? = nil, jobStatus: JobStatus? = nil, message: String? = nil, outputDataConfig: OutputDataConfig? = nil, submitTime: Date? = nil, volumeKmsKeyId: String? = nil, vpcConfig: VpcConfig? = nil) {
            self.dataAccessRoleArn = dataAccessRoleArn
            self.endTime = endTime
            self.inputDataConfig = inputDataConfig
            self.jobArn = jobArn
            self.jobId = jobId
            self.jobName = jobName
            self.jobStatus = jobStatus
            self.message = message
            self.outputDataConfig = outputDataConfig
            self.submitTime = submitTime
            self.volumeKmsKeyId = volumeKmsKeyId
            self.vpcConfig = vpcConfig
        }

        private enum CodingKeys: String, CodingKey {
            case dataAccessRoleArn = "DataAccessRoleArn"
            case endTime = "EndTime"
            case inputDataConfig = "InputDataConfig"
            case jobArn = "JobArn"
            case jobId = "JobId"
            case jobName = "JobName"
            case jobStatus = "JobStatus"
            case message = "Message"
            case outputDataConfig = "OutputDataConfig"
            case submitTime = "SubmitTime"
            case volumeKmsKeyId = "VolumeKmsKeyId"
            case vpcConfig = "VpcConfig"
        }
    }

    public struct EndpointFilter: AWSEncodableShape {
        /// Specifies a date after which the returned endpoint or endpoints were created.
        public let creationTimeAfter: Date?
        /// Specifies a date before which the returned endpoint or endpoints were created.
        public let creationTimeBefore: Date?
        /// The Amazon Resource Number (ARN) of the model to which the endpoint is attached.
        public let modelArn: String?
        /// Specifies the status of the endpoint being returned. Possible values are: Creating, Ready, Updating, Deleting, Failed.
        public let status: EndpointStatus?

        public init(creationTimeAfter: Date? = nil, creationTimeBefore: Date? = nil, modelArn: String? = nil, status: EndpointStatus? = nil) {
            self.creationTimeAfter = creationTimeAfter
            self.creationTimeBefore = creationTimeBefore
            self.modelArn = modelArn
            self.status = status
        }

        public func validate(name: String) throws {
            try self.validate(self.modelArn, name: "modelArn", parent: name, max: 256)
            try self.validate(self.modelArn, name: "modelArn", parent: name, pattern: "^arn:aws(-[^:]+)?:comprehend:[a-zA-Z0-9-]*:[0-9]{12}:(document-classifier|entity-recognizer)/[a-zA-Z0-9](-*[a-zA-Z0-9])*(/version/[a-zA-Z0-9](-*[a-zA-Z0-9])*)?$")
        }

        private enum CodingKeys: String, CodingKey {
            case creationTimeAfter = "CreationTimeAfter"
            case creationTimeBefore = "CreationTimeBefore"
            case modelArn = "ModelArn"
            case status = "Status"
        }
    }

    public struct EndpointProperties: AWSDecodableShape {
        /// The creation date and time of the endpoint.
        public let creationTime: Date?
        /// The number of inference units currently used by the model using this endpoint.
        public let currentInferenceUnits: Int?
        /// The Amazon Resource Name (ARN) of the AWS identity and Access Management (IAM) role that grants Amazon Comprehend read access to trained custom models encrypted with a customer managed key (ModelKmsKeyId).
        public let dataAccessRoleArn: String?
        /// Data access role ARN to use in case the new model is encrypted with a customer KMS key.
        public let desiredDataAccessRoleArn: String?
        /// The desired number of inference units to be used by the model using this endpoint.  Each inference unit represents of a throughput of 100 characters per second.
        public let desiredInferenceUnits: Int?
        /// ARN of the new model to use for updating an existing endpoint. This ARN is going to be different from the model ARN when the update is in progress
        public let desiredModelArn: String?
        /// The Amazon Resource Number (ARN) of the endpoint.
        public let endpointArn: String?
        /// The date and time that the endpoint was last modified.
        public let lastModifiedTime: Date?
        /// Specifies a reason for failure in cases of Failed status.
        public let message: String?
        /// The Amazon Resource Number (ARN) of the model to which the endpoint is attached.
        public let modelArn: String?
        /// Specifies the status of the endpoint. Because the endpoint updates and creation are asynchronous, so customers will need to wait for the endpoint to be Ready status before making inference requests.
        public let status: EndpointStatus?

        public init(creationTime: Date? = nil, currentInferenceUnits: Int? = nil, dataAccessRoleArn: String? = nil, desiredDataAccessRoleArn: String? = nil, desiredInferenceUnits: Int? = nil, desiredModelArn: String? = nil, endpointArn: String? = nil, lastModifiedTime: Date? = nil, message: String? = nil, modelArn: String? = nil, status: EndpointStatus? = nil) {
            self.creationTime = creationTime
            self.currentInferenceUnits = currentInferenceUnits
            self.dataAccessRoleArn = dataAccessRoleArn
            self.desiredDataAccessRoleArn = desiredDataAccessRoleArn
            self.desiredInferenceUnits = desiredInferenceUnits
            self.desiredModelArn = desiredModelArn
            self.endpointArn = endpointArn
            self.lastModifiedTime = lastModifiedTime
            self.message = message
            self.modelArn = modelArn
            self.status = status
        }

        private enum CodingKeys: String, CodingKey {
            case creationTime = "CreationTime"
            case currentInferenceUnits = "CurrentInferenceUnits"
            case dataAccessRoleArn = "DataAccessRoleArn"
            case desiredDataAccessRoleArn = "DesiredDataAccessRoleArn"
            case desiredInferenceUnits = "DesiredInferenceUnits"
            case desiredModelArn = "DesiredModelArn"
            case endpointArn = "EndpointArn"
            case lastModifiedTime = "LastModifiedTime"
            case message = "Message"
            case modelArn = "ModelArn"
            case status = "Status"
        }
    }

    public struct EntitiesDetectionJobFilter: AWSEncodableShape {
        /// Filters on the name of the job.
        public let jobName: String?
        /// Filters the list of jobs based on job status. Returns only jobs with the specified status.
        public let jobStatus: JobStatus?
        /// Filters the list of jobs based on the time that the job was submitted for processing. Returns only jobs submitted after the specified time. Jobs are returned in descending order, newest to oldest.
        public let submitTimeAfter: Date?
        /// Filters the list of jobs based on the time that the job was submitted for processing. Returns only jobs submitted before the specified time. Jobs are returned in ascending order, oldest to newest.
        public let submitTimeBefore: Date?

        public init(jobName: String? = nil, jobStatus: JobStatus? = nil, submitTimeAfter: Date? = nil, submitTimeBefore: Date? = nil) {
            self.jobName = jobName
            self.jobStatus = jobStatus
            self.submitTimeAfter = submitTimeAfter
            self.submitTimeBefore = submitTimeBefore
        }

        public func validate(name: String) throws {
            try self.validate(self.jobName, name: "jobName", parent: name, max: 256)
            try self.validate(self.jobName, name: "jobName", parent: name, min: 1)
            try self.validate(self.jobName, name: "jobName", parent: name, pattern: "^([\\p{L}\\p{Z}\\p{N}_.:/=+\\-%@]*)$")
        }

        private enum CodingKeys: String, CodingKey {
            case jobName = "JobName"
            case jobStatus = "JobStatus"
            case submitTimeAfter = "SubmitTimeAfter"
            case submitTimeBefore = "SubmitTimeBefore"
        }
    }

    public struct EntitiesDetectionJobProperties: AWSDecodableShape {
        /// The Amazon Resource Name (ARN) that gives Amazon Comprehend read access to your input data.
        public let dataAccessRoleArn: String?
        /// The time that the entities detection job completed
        public let endTime: Date?
        /// The Amazon Resource Name (ARN) that identifies the entity recognizer.
        public let entityRecognizerArn: String?
        /// The input data configuration that you supplied when you created the entities detection job.
        public let inputDataConfig: InputDataConfig?
        /// The Amazon Resource Name (ARN) of the entities detection job. It is a unique, fully qualified identifier for the job. It includes the AWS account, Region, and the job ID. The format of the ARN is as follows:  arn::comprehend:::entities-detection-job/  The following is an example job ARN:  arn:aws:comprehend:us-west-2:111122223333:entities-detection-job/1234abcd12ab34cd56ef1234567890ab
        public let jobArn: String?
        /// The identifier assigned to the entities detection job.
        public let jobId: String?
        /// The name that you assigned the entities detection job.
        public let jobName: String?
        /// The current status of the entities detection job. If the status is FAILED, the Message field shows the reason for the failure.
        public let jobStatus: JobStatus?
        /// The language code of the input documents.
        public let languageCode: LanguageCode?
        /// A description of the status of a job.
        public let message: String?
        /// The output data configuration that you supplied when you created the entities detection job.
        public let outputDataConfig: OutputDataConfig?
        /// The time that the entities detection job was submitted for processing.
        public let submitTime: Date?
        /// ID for the AWS Key Management Service (KMS) key that Amazon Comprehend uses to encrypt data on the storage volume attached to the ML compute instance(s) that process the analysis job. The VolumeKmsKeyId can be either of the following formats:   KMS Key ID: "1234abcd-12ab-34cd-56ef-1234567890ab"    Amazon Resource Name (ARN) of a KMS Key: "arn:aws:kms:us-west-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab"
        public let volumeKmsKeyId: String?
        ///  Configuration parameters for a private Virtual Private Cloud (VPC) containing the resources you are using for your entity detection job. For more information, see Amazon VPC.
        public let vpcConfig: VpcConfig?

        public init(dataAccessRoleArn: String? = nil, endTime: Date? = nil, entityRecognizerArn: String? = nil, inputDataConfig: InputDataConfig? = nil, jobArn: String? = nil, jobId: String? = nil, jobName: String? = nil, jobStatus: JobStatus? = nil, languageCode: LanguageCode? = nil, message: String? = nil, outputDataConfig: OutputDataConfig? = nil, submitTime: Date? = nil, volumeKmsKeyId: String? = nil, vpcConfig: VpcConfig? = nil) {
            self.dataAccessRoleArn = dataAccessRoleArn
            self.endTime = endTime
            self.entityRecognizerArn = entityRecognizerArn
            self.inputDataConfig = inputDataConfig
            self.jobArn = jobArn
            self.jobId = jobId
            self.jobName = jobName
            self.jobStatus = jobStatus
            self.languageCode = languageCode
            self.message = message
            self.outputDataConfig = outputDataConfig
            self.submitTime = submitTime
            self.volumeKmsKeyId = volumeKmsKeyId
            self.vpcConfig = vpcConfig
        }

        private enum CodingKeys: String, CodingKey {
            case dataAccessRoleArn = "DataAccessRoleArn"
            case endTime = "EndTime"
            case entityRecognizerArn = "EntityRecognizerArn"
            case inputDataConfig = "InputDataConfig"
            case jobArn = "JobArn"
            case jobId = "JobId"
            case jobName = "JobName"
            case jobStatus = "JobStatus"
            case languageCode = "LanguageCode"
            case message = "Message"
            case outputDataConfig = "OutputDataConfig"
            case submitTime = "SubmitTime"
            case volumeKmsKeyId = "VolumeKmsKeyId"
            case vpcConfig = "VpcConfig"
        }
    }

    public struct Entity: AWSDecodableShape {
        /// The zero-based offset from the beginning of the source text to the first character in the entity.  This field is empty for non-text input.
        public let beginOffset: Int?
        /// A reference to each block for this entity. This field is empty for plain-text input.
        public let blockReferences: [BlockReference]?
        /// The zero-based offset from the beginning of the source text to the last character in the entity. This field is empty for non-text input.
        public let endOffset: Int?
        /// The level of confidence that Amazon Comprehend has in the accuracy of the detection.
        public let score: Float?
        /// The text of the entity.
        public let text: String?
        /// The entity type. For entity detection using the built-in model, this field contains one of the  standard entity types listed below. For custom entity detection, this field contains one of the  entity types that you specified when you trained your custom model.
        public let type: EntityType?

        public init(beginOffset: Int? = nil, blockReferences: [BlockReference]? = nil, endOffset: Int? = nil, score: Float? = nil, text: String? = nil, type: EntityType? = nil) {
            self.beginOffset = beginOffset
            self.blockReferences = blockReferences
            self.endOffset = endOffset
            self.score = score
            self.text = text
            self.type = type
        }

        private enum CodingKeys: String, CodingKey {
            case beginOffset = "BeginOffset"
            case blockReferences = "BlockReferences"
            case endOffset = "EndOffset"
            case score = "Score"
            case text = "Text"
            case type = "Type"
        }
    }

    public struct EntityLabel: AWSDecodableShape {
        /// The name of the label.
        public let name: PiiEntityType?
        /// The level of confidence that Amazon Comprehend has in the accuracy of the detection.
        public let score: Float?

        public init(name: PiiEntityType? = nil, score: Float? = nil) {
            self.name = name
            self.score = score
        }

        private enum CodingKeys: String, CodingKey {
            case name = "Name"
            case score = "Score"
        }
    }

    public struct EntityRecognizerAnnotations: AWSEncodableShape & AWSDecodableShape {
        ///  Specifies the Amazon S3 location where the annotations for an entity recognizer are located. The URI must be in the same region as the API endpoint that you are calling.
        public let s3Uri: String
        ///  Specifies the Amazon S3 location where the test annotations for an entity recognizer are located. The URI must be in the same region as the API endpoint that you are calling.
        public let testS3Uri: String?

        public init(s3Uri: String, testS3Uri: String? = nil) {
            self.s3Uri = s3Uri
            self.testS3Uri = testS3Uri
        }

        public func validate(name: String) throws {
            try self.validate(self.s3Uri, name: "s3Uri", parent: name, max: 1024)
            try self.validate(self.s3Uri, name: "s3Uri", parent: name, pattern: "^s3://[a-z0-9][\\.\\-a-z0-9]{1,61}[a-z0-9](/.*)?$")
            try self.validate(self.testS3Uri, name: "testS3Uri", parent: name, max: 1024)
            try self.validate(self.testS3Uri, name: "testS3Uri", parent: name, pattern: "^s3://[a-z0-9][\\.\\-a-z0-9]{1,61}[a-z0-9](/.*)?$")
        }

        private enum CodingKeys: String, CodingKey {
            case s3Uri = "S3Uri"
            case testS3Uri = "TestS3Uri"
        }
    }

    public struct EntityRecognizerDocuments: AWSEncodableShape & AWSDecodableShape {
        ///  Specifies how the text in an input file should be processed. This is optional, and the default is ONE_DOC_PER_LINE. ONE_DOC_PER_FILE - Each file is considered a separate document. Use this option when you are processing large documents, such as newspaper articles or scientific papers. ONE_DOC_PER_LINE - Each line in a file is considered a separate document. Use this option when you are processing many short documents, such as text messages.
        public let inputFormat: InputFormat?
        ///  Specifies the Amazon S3 location where the training documents for an entity recognizer are located. The URI must be in the same region as the API endpoint that you are calling.
        public let s3Uri: String
        ///  Specifies the Amazon S3 location where the test documents for an entity recognizer are located. The URI must be in the same AWS Region as the API endpoint that you are calling.
        public let testS3Uri: String?

        public init(inputFormat: InputFormat? = nil, s3Uri: String, testS3Uri: String? = nil) {
            self.inputFormat = inputFormat
            self.s3Uri = s3Uri
            self.testS3Uri = testS3Uri
        }

        public func validate(name: String) throws {
            try self.validate(self.s3Uri, name: "s3Uri", parent: name, max: 1024)
            try self.validate(self.s3Uri, name: "s3Uri", parent: name, pattern: "^s3://[a-z0-9][\\.\\-a-z0-9]{1,61}[a-z0-9](/.*)?$")
            try self.validate(self.testS3Uri, name: "testS3Uri", parent: name, max: 1024)
            try self.validate(self.testS3Uri, name: "testS3Uri", parent: name, pattern: "^s3://[a-z0-9][\\.\\-a-z0-9]{1,61}[a-z0-9](/.*)?$")
        }

        private enum CodingKeys: String, CodingKey {
            case inputFormat = "InputFormat"
            case s3Uri = "S3Uri"
            case testS3Uri = "TestS3Uri"
        }
    }

    public struct EntityRecognizerEntityList: AWSEncodableShape & AWSDecodableShape {
        /// Specifies the Amazon S3 location where the entity list is located. The URI must be in the same region as the API endpoint that you are calling.
        public let s3Uri: String

        public init(s3Uri: String) {
            self.s3Uri = s3Uri
        }

        public func validate(name: String) throws {
            try self.validate(self.s3Uri, name: "s3Uri", parent: name, max: 1024)
            try self.validate(self.s3Uri, name: "s3Uri", parent: name, pattern: "^s3://[a-z0-9][\\.\\-a-z0-9]{1,61}[a-z0-9](/.*)?$")
        }

        private enum CodingKeys: String, CodingKey {
            case s3Uri = "S3Uri"
        }
    }

    public struct EntityRecognizerEvaluationMetrics: AWSDecodableShape {
        /// A measure of how accurate the recognizer results are for the test data. It is derived from the Precision and Recall values. The F1Score is the harmonic average of the two scores. For plain text entity recognizer models, the range is 0 to 100, where 100 is the best score. For PDF/Word entity recognizer models, the range is 0 to 1, where 1 is the best score.
        public let f1Score: Double?
        /// A measure of the usefulness of the recognizer results in the test data. High precision means that the recognizer returned substantially more relevant results than irrelevant ones.
        public let precision: Double?
        /// A measure of how complete the recognizer results are for the test data. High recall means that the recognizer returned most of the relevant results.
        public let recall: Double?

        public init(f1Score: Double? = nil, precision: Double? = nil, recall: Double? = nil) {
            self.f1Score = f1Score
            self.precision = precision
            self.recall = recall
        }

        private enum CodingKeys: String, CodingKey {
            case f1Score = "F1Score"
            case precision = "Precision"
            case recall = "Recall"
        }
    }

    public struct EntityRecognizerFilter: AWSEncodableShape {
        /// The name that you assigned the entity recognizer.
        public let recognizerName: String?
        /// The status of an entity recognizer.
        public let status: ModelStatus?
        /// Filters the list of entities based on the time that the list was submitted for processing. Returns only jobs submitted after the specified time. Jobs are returned in ascending order, oldest to newest.
        public let submitTimeAfter: Date?
        /// Filters the list of entities based on the time that the list was submitted for processing. Returns only jobs submitted before the specified time. Jobs are returned in descending order, newest to oldest.
        public let submitTimeBefore: Date?

        public init(recognizerName: String? = nil, status: ModelStatus? = nil, submitTimeAfter: Date? = nil, submitTimeBefore: Date? = nil) {
            self.recognizerName = recognizerName
            self.status = status
            self.submitTimeAfter = submitTimeAfter
            self.submitTimeBefore = submitTimeBefore
        }

        public func validate(name: String) throws {
            try self.validate(self.recognizerName, name: "recognizerName", parent: name, max: 63)
            try self.validate(self.recognizerName, name: "recognizerName", parent: name, pattern: "^[a-zA-Z0-9](-*[a-zA-Z0-9])*$")
        }

        private enum CodingKeys: String, CodingKey {
            case recognizerName = "RecognizerName"
            case status = "Status"
            case submitTimeAfter = "SubmitTimeAfter"
            case submitTimeBefore = "SubmitTimeBefore"
        }
    }

    public struct EntityRecognizerInputDataConfig: AWSEncodableShape & AWSDecodableShape {
        /// The S3 location of the CSV file that annotates your training documents.
        public let annotations: EntityRecognizerAnnotations?
        /// A list of augmented manifest files that provide training data for your custom model. An augmented manifest file is a labeled dataset that is produced by Amazon SageMaker Ground Truth. This parameter is required if you set DataFormat to AUGMENTED_MANIFEST.
        public let augmentedManifests: [AugmentedManifestsListItem]?
        /// The format of your training data:    COMPREHEND_CSV: A CSV file that supplements your training documents. The CSV file contains information about the custom entities that your trained model will detect. The required format of the file depends on whether you are providing annotations or an entity list. If you use this value, you must provide your CSV file by using either the Annotations or EntityList parameters. You must provide your training documents by using the Documents parameter.    AUGMENTED_MANIFEST: A labeled dataset that is produced by Amazon SageMaker Ground Truth. This file is in JSON lines format. Each line is a complete JSON object that contains a training document and its labels. Each label annotates a named entity in the training document.  If you use this value, you must provide the AugmentedManifests parameter in your request.   If you don't specify a value, Amazon Comprehend uses COMPREHEND_CSV as the default.
        public let dataFormat: EntityRecognizerDataFormat?
        /// The S3 location of the folder that contains the training documents for your custom entity recognizer. This parameter is required if you set DataFormat to COMPREHEND_CSV.
        public let documents: EntityRecognizerDocuments?
        /// The S3 location of the CSV file that has the entity list for your custom entity recognizer.
        public let entityList: EntityRecognizerEntityList?
        /// The entity types in the labeled training data that Amazon Comprehend uses to train the custom entity recognizer. Any entity types that you don't specify are ignored. A maximum of 25 entity types can be used at one time to train an entity recognizer. Entity types must not contain the following invalid characters: \n (line break), \\n (escaped line break), \r (carriage return), \\r (escaped carriage return), \t (tab), \\t (escaped tab), space, and , (comma).
        public let entityTypes: [EntityTypesListItem]

        public init(annotations: EntityRecognizerAnnotations? = nil, augmentedManifests: [AugmentedManifestsListItem]? = nil, dataFormat: EntityRecognizerDataFormat? = nil, documents: EntityRecognizerDocuments? = nil, entityList: EntityRecognizerEntityList? = nil, entityTypes: [EntityTypesListItem]) {
            self.annotations = annotations
            self.augmentedManifests = augmentedManifests
            self.dataFormat = dataFormat
            self.documents = documents
            self.entityList = entityList
            self.entityTypes = entityTypes
        }

        public func validate(name: String) throws {
            try self.annotations?.validate(name: "\(name).annotations")
            try self.augmentedManifests?.forEach {
                try $0.validate(name: "\(name).augmentedManifests[]")
            }
            try self.documents?.validate(name: "\(name).documents")
            try self.entityList?.validate(name: "\(name).entityList")
            try self.entityTypes.forEach {
                try $0.validate(name: "\(name).entityTypes[]")
            }
        }

        private enum CodingKeys: String, CodingKey {
            case annotations = "Annotations"
            case augmentedManifests = "AugmentedManifests"
            case dataFormat = "DataFormat"
            case documents = "Documents"
            case entityList = "EntityList"
            case entityTypes = "EntityTypes"
        }
    }

    public struct EntityRecognizerMetadata: AWSDecodableShape {
        /// Entity types from the metadata of an entity recognizer.
        public let entityTypes: [EntityRecognizerMetadataEntityTypesListItem]?
        /// Detailed information about the accuracy of an entity recognizer.
        public let evaluationMetrics: EntityRecognizerEvaluationMetrics?
        ///  The number of documents in the input data that were used to test the entity recognizer. Typically this is 10 to 20 percent of the input documents.
        public let numberOfTestDocuments: Int?
        ///  The number of documents in the input data that were used to train the entity recognizer. Typically this is 80 to 90 percent of the input documents.
        public let numberOfTrainedDocuments: Int?

        public init(entityTypes: [EntityRecognizerMetadataEntityTypesListItem]? = nil, evaluationMetrics: EntityRecognizerEvaluationMetrics? = nil, numberOfTestDocuments: Int? = nil, numberOfTrainedDocuments: Int? = nil) {
            self.entityTypes = entityTypes
            self.evaluationMetrics = evaluationMetrics
            self.numberOfTestDocuments = numberOfTestDocuments
            self.numberOfTrainedDocuments = numberOfTrainedDocuments
        }

        private enum CodingKeys: String, CodingKey {
            case entityTypes = "EntityTypes"
            case evaluationMetrics = "EvaluationMetrics"
            case numberOfTestDocuments = "NumberOfTestDocuments"
            case numberOfTrainedDocuments = "NumberOfTrainedDocuments"
        }
    }

    public struct EntityRecognizerMetadataEntityTypesListItem: AWSDecodableShape {
        /// Detailed information about the accuracy of the entity recognizer for a specific item on the list of entity types.
        public let evaluationMetrics: EntityTypesEvaluationMetrics?
        /// Indicates the number of times the given entity type was seen in the training data.
        public let numberOfTrainMentions: Int?
        /// Type of entity from the list of entity types in the metadata of an entity recognizer.
        public let type: String?

        public init(evaluationMetrics: EntityTypesEvaluationMetrics? = nil, numberOfTrainMentions: Int? = nil, type: String? = nil) {
            self.evaluationMetrics = evaluationMetrics
            self.numberOfTrainMentions = numberOfTrainMentions
            self.type = type
        }

        private enum CodingKeys: String, CodingKey {
            case evaluationMetrics = "EvaluationMetrics"
            case numberOfTrainMentions = "NumberOfTrainMentions"
            case type = "Type"
        }
    }

    public struct EntityRecognizerProperties: AWSDecodableShape {
        ///  The Amazon Resource Name (ARN) of the AWS Identity and Management (IAM) role that grants Amazon Comprehend read access to your input data.
        public let dataAccessRoleArn: String?
        /// The time that the recognizer creation completed.
        public let endTime: Date?
        /// The Amazon Resource Name (ARN) that identifies the entity recognizer.
        public let entityRecognizerArn: String?
        /// The input data properties of an entity recognizer.
        public let inputDataConfig: EntityRecognizerInputDataConfig?
        ///  The language of the input documents. All documents must be in the same language. Only English ("en") is currently supported.
        public let languageCode: LanguageCode?
        ///  A description of the status of the recognizer.
        public let message: String?
        /// ID for the AWS Key Management Service (KMS) key that Amazon Comprehend uses to encrypt trained custom models. The ModelKmsKeyId can be either of the following formats:    KMS Key ID: "1234abcd-12ab-34cd-56ef-1234567890ab"    Amazon Resource Name (ARN) of a KMS Key: "arn:aws:kms:us-west-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab"
        public let modelKmsKeyId: String?
        ///  Provides information about an entity recognizer.
        public let recognizerMetadata: EntityRecognizerMetadata?
        /// The Amazon Resource Name (ARN) of the source model. This model was imported from a different AWS account to create the entity recognizer model in your AWS account.
        public let sourceModelArn: String?
        /// Provides the status of the entity recognizer.
        public let status: ModelStatus?
        /// The time that the recognizer was submitted for processing.
        public let submitTime: Date?
        /// The time that training of the entity recognizer was completed.
        public let trainingEndTime: Date?
        /// The time that training of the entity recognizer started.
        public let trainingStartTime: Date?
        /// The version name you assigned to the entity recognizer.
        public let versionName: String?
        /// ID for the AWS Key Management Service (KMS) key that Amazon Comprehend uses to encrypt data on the storage volume attached to the ML compute instance(s) that process the analysis job. The VolumeKmsKeyId can be either of the following formats:   KMS Key ID: "1234abcd-12ab-34cd-56ef-1234567890ab"    Amazon Resource Name (ARN) of a KMS Key: "arn:aws:kms:us-west-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab"
        public let volumeKmsKeyId: String?
        ///  Configuration parameters for a private Virtual Private Cloud (VPC) containing the resources you are using for your custom entity recognizer. For more information, see Amazon VPC.
        public let vpcConfig: VpcConfig?

        public init(dataAccessRoleArn: String? = nil, endTime: Date? = nil, entityRecognizerArn: String? = nil, inputDataConfig: EntityRecognizerInputDataConfig? = nil, languageCode: LanguageCode? = nil, message: String? = nil, modelKmsKeyId: String? = nil, recognizerMetadata: EntityRecognizerMetadata? = nil, sourceModelArn: String? = nil, status: ModelStatus? = nil, submitTime: Date? = nil, trainingEndTime: Date? = nil, trainingStartTime: Date? = nil, versionName: String? = nil, volumeKmsKeyId: String? = nil, vpcConfig: VpcConfig? = nil) {
            self.dataAccessRoleArn = dataAccessRoleArn
            self.endTime = endTime
            self.entityRecognizerArn = entityRecognizerArn
            self.inputDataConfig = inputDataConfig
            self.languageCode = languageCode
            self.message = message
            self.modelKmsKeyId = modelKmsKeyId
            self.recognizerMetadata = recognizerMetadata
            self.sourceModelArn = sourceModelArn
            self.status = status
            self.submitTime = submitTime
            self.trainingEndTime = trainingEndTime
            self.trainingStartTime = trainingStartTime
            self.versionName = versionName
            self.volumeKmsKeyId = volumeKmsKeyId
            self.vpcConfig = vpcConfig
        }

        private enum CodingKeys: String, CodingKey {
            case dataAccessRoleArn = "DataAccessRoleArn"
            case endTime = "EndTime"
            case entityRecognizerArn = "EntityRecognizerArn"
            case inputDataConfig = "InputDataConfig"
            case languageCode = "LanguageCode"
            case message = "Message"
            case modelKmsKeyId = "ModelKmsKeyId"
            case recognizerMetadata = "RecognizerMetadata"
            case sourceModelArn = "SourceModelArn"
            case status = "Status"
            case submitTime = "SubmitTime"
            case trainingEndTime = "TrainingEndTime"
            case trainingStartTime = "TrainingStartTime"
            case versionName = "VersionName"
            case volumeKmsKeyId = "VolumeKmsKeyId"
            case vpcConfig = "VpcConfig"
        }
    }

    public struct EntityRecognizerSummary: AWSDecodableShape {
        ///  The time that the latest entity recognizer version was submitted for processing.
        public let latestVersionCreatedAt: Date?
        ///  The version name you assigned to the latest entity recognizer version.
        public let latestVersionName: String?
        ///  Provides the status of the latest entity recognizer version.
        public let latestVersionStatus: ModelStatus?
        ///  The number of versions you created.
        public let numberOfVersions: Int?
        ///  The name that you assigned the entity recognizer.
        public let recognizerName: String?

        public init(latestVersionCreatedAt: Date? = nil, latestVersionName: String? = nil, latestVersionStatus: ModelStatus? = nil, numberOfVersions: Int? = nil, recognizerName: String? = nil) {
            self.latestVersionCreatedAt = latestVersionCreatedAt
            self.latestVersionName = latestVersionName
            self.latestVersionStatus = latestVersionStatus
            self.numberOfVersions = numberOfVersions
            self.recognizerName = recognizerName
        }

        private enum CodingKeys: String, CodingKey {
            case latestVersionCreatedAt = "LatestVersionCreatedAt"
            case latestVersionName = "LatestVersionName"
            case latestVersionStatus = "LatestVersionStatus"
            case numberOfVersions = "NumberOfVersions"
            case recognizerName = "RecognizerName"
        }
    }

    public struct EntityTypesEvaluationMetrics: AWSDecodableShape {
        /// A measure of how accurate the recognizer results are for a specific entity type in the test data. It is derived from the Precision and Recall values. The F1Score is the harmonic average of the two scores. The highest score is 1, and the worst score is 0.
        public let f1Score: Double?
        /// A measure of the usefulness of the recognizer results for a specific entity type in the test data. High precision means that the recognizer returned substantially more relevant results than irrelevant ones.
        public let precision: Double?
        /// A measure of how complete the recognizer results are for a specific entity type in the test data. High recall means that the recognizer returned most of the relevant results.
        public let recall: Double?

        public init(f1Score: Double? = nil, precision: Double? = nil, recall: Double? = nil) {
            self.f1Score = f1Score
            self.precision = precision
            self.recall = recall
        }

        private enum CodingKeys: String, CodingKey {
            case f1Score = "F1Score"
            case precision = "Precision"
            case recall = "Recall"
        }
    }

    public struct EntityTypesListItem: AWSEncodableShape & AWSDecodableShape {
        /// An entity type within a labeled training dataset that Amazon Comprehend uses to train a custom entity recognizer. Entity types must not contain the following invalid characters: \n (line break), \\n (escaped line break, \r (carriage return), \\r (escaped carriage return), \t (tab), \\t (escaped tab), space, and , (comma).
        public let type: String

        public init(type: String) {
            self.type = type
        }

        public func validate(name: String) throws {
            try self.validate(self.type, name: "type", parent: name, max: 64)
            try self.validate(self.type, name: "type", parent: name, pattern: "^(?![^\\n\\r\\t,]*\\\\n|\\\\r|\\\\t)[^\\n\\r\\t,]+$")
        }

        private enum CodingKeys: String, CodingKey {
            case type = "Type"
        }
    }

    public struct ErrorsListItem: AWSDecodableShape {
        /// Error code for the cause of the error.
        public let errorCode: PageBasedErrorCode?
        /// Text message explaining the reason for the error.
        public let errorMessage: String?
        /// Page number where the error occurred.
        public let page: Int?

        public init(errorCode: PageBasedErrorCode? = nil, errorMessage: String? = nil, page: Int? = nil) {
            self.errorCode = errorCode
            self.errorMessage = errorMessage
            self.page = page
        }

        private enum CodingKeys: String, CodingKey {
            case errorCode = "ErrorCode"
            case errorMessage = "ErrorMessage"
            case page = "Page"
        }
    }

    public struct EventsDetectionJobFilter: AWSEncodableShape {
        /// Filters on the name of the events detection job.
        public let jobName: String?
        /// Filters the list of jobs based on job status. Returns only jobs with the specified status.
        public let jobStatus: JobStatus?
        /// Filters the list of jobs based on the time that the job was submitted for processing. Returns only jobs submitted after the specified time. Jobs are returned in descending order, newest to oldest.
        public let submitTimeAfter: Date?
        /// Filters the list of jobs based on the time that the job was submitted for processing. Returns only jobs submitted before the specified time. Jobs are returned in ascending order, oldest to newest.
        public let submitTimeBefore: Date?

        public init(jobName: String? = nil, jobStatus: JobStatus? = nil, submitTimeAfter: Date? = nil, submitTimeBefore: Date? = nil) {
            self.jobName = jobName
            self.jobStatus = jobStatus
            self.submitTimeAfter = submitTimeAfter
            self.submitTimeBefore = submitTimeBefore
        }

        public func validate(name: String) throws {
            try self.validate(self.jobName, name: "jobName", parent: name, max: 256)
            try self.validate(self.jobName, name: "jobName", parent: name, min: 1)
            try self.validate(self.jobName, name: "jobName", parent: name, pattern: "^([\\p{L}\\p{Z}\\p{N}_.:/=+\\-%@]*)$")
        }

        private enum CodingKeys: String, CodingKey {
            case jobName = "JobName"
            case jobStatus = "JobStatus"
            case submitTimeAfter = "SubmitTimeAfter"
            case submitTimeBefore = "SubmitTimeBefore"
        }
    }

    public struct EventsDetectionJobProperties: AWSDecodableShape {
        /// The Amazon Resource Name (ARN) of the AWS Identify and Access Management (IAM) role that grants Amazon Comprehend read access to your input data.
        public let dataAccessRoleArn: String?
        /// The time that the events detection job completed.
        public let endTime: Date?
        /// The input data configuration that you supplied when you created the events detection job.
        public let inputDataConfig: InputDataConfig?
        /// The Amazon Resource Name (ARN) of the events detection job. It is a unique, fully qualified identifier for the job. It includes the AWS account, Region, and the job ID. The format of the ARN is as follows:  arn::comprehend:::events-detection-job/  The following is an example job ARN:  arn:aws:comprehend:us-west-2:111122223333:events-detection-job/1234abcd12ab34cd56ef1234567890ab
        public let jobArn: String?
        /// The identifier assigned to the events detection job.
        public let jobId: String?
        /// The name you assigned the events detection job.
        public let jobName: String?
        /// The current status of the events detection job.
        public let jobStatus: JobStatus?
        /// The language code of the input documents.
        public let languageCode: LanguageCode?
        /// A description of the status of the events detection job.
        public let message: String?
        /// The output data configuration that you supplied when you created the events detection job.
        public let outputDataConfig: OutputDataConfig?
        /// The time that the events detection job was submitted for processing.
        public let submitTime: Date?
        /// The types of events that are detected by the job.
        public let targetEventTypes: [String]?

        public init(dataAccessRoleArn: String? = nil, endTime: Date? = nil, inputDataConfig: InputDataConfig? = nil, jobArn: String? = nil, jobId: String? = nil, jobName: String? = nil, jobStatus: JobStatus? = nil, languageCode: LanguageCode? = nil, message: String? = nil, outputDataConfig: OutputDataConfig? = nil, submitTime: Date? = nil, targetEventTypes: [String]? = nil) {
            self.dataAccessRoleArn = dataAccessRoleArn
            self.endTime = endTime
            self.inputDataConfig = inputDataConfig
            self.jobArn = jobArn
            self.jobId = jobId
            self.jobName = jobName
            self.jobStatus = jobStatus
            self.languageCode = languageCode
            self.message = message
            self.outputDataConfig = outputDataConfig
            self.submitTime = submitTime
            self.targetEventTypes = targetEventTypes
        }

        private enum CodingKeys: String, CodingKey {
            case dataAccessRoleArn = "DataAccessRoleArn"
            case endTime = "EndTime"
            case inputDataConfig = "InputDataConfig"
            case jobArn = "JobArn"
            case jobId = "JobId"
            case jobName = "JobName"
            case jobStatus = "JobStatus"
            case languageCode = "LanguageCode"
            case message = "Message"
            case outputDataConfig = "OutputDataConfig"
            case submitTime = "SubmitTime"
            case targetEventTypes = "TargetEventTypes"
        }
    }

    public struct ExtractedCharactersListItem: AWSDecodableShape {
        /// Number of characters extracted from each page.
        public let count: Int?
        /// Page number.
        public let page: Int?

        public init(count: Int? = nil, page: Int? = nil) {
            self.count = count
            self.page = page
        }

        private enum CodingKeys: String, CodingKey {
            case count = "Count"
            case page = "Page"
        }
    }

    public struct Geometry: AWSDecodableShape {
        /// An axis-aligned coarse representation of the location of the recognized item on the  document page.
        public let boundingBox: BoundingBox?
        /// Within the bounding box, a fine-grained polygon around the recognized item.
        public let polygon: [Point]?

        public init(boundingBox: BoundingBox? = nil, polygon: [Point]? = nil) {
            self.boundingBox = boundingBox
            self.polygon = polygon
        }

        private enum CodingKeys: String, CodingKey {
            case boundingBox = "BoundingBox"
            case polygon = "Polygon"
        }
    }

    public struct ImportModelRequest: AWSEncodableShape {
        /// The Amazon Resource Name (ARN) of the AWS Identity and Management (IAM) role that allows Amazon Comprehend to use Amazon Key Management Service (KMS) to encrypt or decrypt the custom model.
        public let dataAccessRoleArn: String?
        /// ID for the AWS Key Management Service (KMS) key that Amazon Comprehend uses to encrypt trained custom models. The ModelKmsKeyId can be either of the following formats:   KMS Key ID: "1234abcd-12ab-34cd-56ef-1234567890ab"    Amazon Resource Name (ARN) of a KMS Key: "arn:aws:kms:us-west-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab"
        public let modelKmsKeyId: String?
        /// The name to assign to the custom model that is created in Amazon Comprehend by this import.
        public let modelName: String?
        /// The Amazon Resource Name (ARN) of the custom model to import.
        public let sourceModelArn: String
        /// Tags to be associated with the custom model that is created by this import. A tag is a key-value pair that adds as a metadata to a resource used by Amazon Comprehend. For example, a tag with "Sales" as the key might be added to a resource to indicate its use by the sales department.
        public let tags: [Tag]?
        /// The version name given to the custom model that is created by this import. Version names can have a maximum of 256 characters. Alphanumeric characters, hyphens (-) and underscores (_) are allowed. The version name must be unique among all models with the same classifier name in the account/AWS Region.
        public let versionName: String?

        public init(dataAccessRoleArn: String? = nil, modelKmsKeyId: String? = nil, modelName: String? = nil, sourceModelArn: String, tags: [Tag]? = nil, versionName: String? = nil) {
            self.dataAccessRoleArn = dataAccessRoleArn
            self.modelKmsKeyId = modelKmsKeyId
            self.modelName = modelName
            self.sourceModelArn = sourceModelArn
            self.tags = tags
            self.versionName = versionName
        }

        public func validate(name: String) throws {
            try self.validate(self.dataAccessRoleArn, name: "dataAccessRoleArn", parent: name, max: 2048)
            try self.validate(self.dataAccessRoleArn, name: "dataAccessRoleArn", parent: name, min: 20)
            try self.validate(self.dataAccessRoleArn, name: "dataAccessRoleArn", parent: name, pattern: "^arn:aws(-[^:]+)?:iam::[0-9]{12}:role/.+$")
            try self.validate(self.modelKmsKeyId, name: "modelKmsKeyId", parent: name, max: 2048)
            try self.validate(self.modelKmsKeyId, name: "modelKmsKeyId", parent: name, pattern: "^\\p{ASCII}+$")
            try self.validate(self.modelName, name: "modelName", parent: name, max: 63)
            try self.validate(self.modelName, name: "modelName", parent: name, pattern: "^[a-zA-Z0-9](-*[a-zA-Z0-9])*$")
            try self.validate(self.sourceModelArn, name: "sourceModelArn", parent: name, max: 256)
            try self.validate(self.sourceModelArn, name: "sourceModelArn", parent: name, pattern: "^arn:aws(-[^:]+)?:comprehend:[a-zA-Z0-9-]*:[0-9]{12}:(document-classifier|entity-recognizer)/[a-zA-Z0-9](-*[a-zA-Z0-9])*(/version/[a-zA-Z0-9](-*[a-zA-Z0-9])*)?$")
            try self.tags?.forEach {
                try $0.validate(name: "\(name).tags[]")
            }
            try self.validate(self.versionName, name: "versionName", parent: name, max: 63)
            try self.validate(self.versionName, name: "versionName", parent: name, pattern: "^[a-zA-Z0-9](-*[a-zA-Z0-9])*$")
        }

        private enum CodingKeys: String, CodingKey {
            case dataAccessRoleArn = "DataAccessRoleArn"
            case modelKmsKeyId = "ModelKmsKeyId"
            case modelName = "ModelName"
            case sourceModelArn = "SourceModelArn"
            case tags = "Tags"
            case versionName = "VersionName"
        }
    }

    public struct ImportModelResponse: AWSDecodableShape {
        /// The Amazon Resource Name (ARN) of the custom model being imported.
        public let modelArn: String?

        public init(modelArn: String? = nil) {
            self.modelArn = modelArn
        }

        private enum CodingKeys: String, CodingKey {
            case modelArn = "ModelArn"
        }
    }

    public struct InputDataConfig: AWSEncodableShape & AWSDecodableShape {
        /// Provides configuration parameters to override the default actions for extracting text  from PDF documents and image files.
        public let documentReaderConfig: DocumentReaderConfig?
        /// Specifies how the text in an input file should be processed:    ONE_DOC_PER_FILE - Each file is considered a separate document. Use this option when you are processing large documents, such as newspaper articles or scientific papers.    ONE_DOC_PER_LINE - Each line in a file is considered a separate document. Use this option when you are processing many short documents, such as text messages.
        public let inputFormat: InputFormat?
        /// The Amazon S3 URI for the input data. The URI must be in same region as the API endpoint that you are calling. The URI can point to a single input file or it can provide the prefix for a collection of data files.  For example, if you use the URI S3://bucketName/prefix, if the prefix is a single file, Amazon Comprehend uses that file as input. If more than one file begins with the prefix, Amazon Comprehend uses all of them as input.
        public let s3Uri: String

        public init(documentReaderConfig: DocumentReaderConfig? = nil, inputFormat: InputFormat? = nil, s3Uri: String) {
            self.documentReaderConfig = documentReaderConfig
            self.inputFormat = inputFormat
            self.s3Uri = s3Uri
        }

        public func validate(name: String) throws {
            try self.documentReaderConfig?.validate(name: "\(name).documentReaderConfig")
            try self.validate(self.s3Uri, name: "s3Uri", parent: name, max: 1024)
            try self.validate(self.s3Uri, name: "s3Uri", parent: name, pattern: "^s3://[a-z0-9][\\.\\-a-z0-9]{1,61}[a-z0-9](/.*)?$")
        }

        private enum CodingKeys: String, CodingKey {
            case documentReaderConfig = "DocumentReaderConfig"
            case inputFormat = "InputFormat"
            case s3Uri = "S3Uri"
        }
    }

    public struct KeyPhrase: AWSDecodableShape {
        /// The zero-based offset from the beginning of the source text to the first character in the key phrase.
        public let beginOffset: Int?
        /// The zero-based offset from the beginning of the source text to the last character in the key phrase.
        public let endOffset: Int?
        /// The level of confidence that Amazon Comprehend has in the accuracy of the detection.
        public let score: Float?
        /// The text of a key noun phrase.
        public let text: String?

        public init(beginOffset: Int? = nil, endOffset: Int? = nil, score: Float? = nil, text: String? = nil) {
            self.beginOffset = beginOffset
            self.endOffset = endOffset
            self.score = score
            self.text = text
        }

        private enum CodingKeys: String, CodingKey {
            case beginOffset = "BeginOffset"
            case endOffset = "EndOffset"
            case score = "Score"
            case text = "Text"
        }
    }

    public struct KeyPhrasesDetectionJobFilter: AWSEncodableShape {
        /// Filters on the name of the job.
        public let jobName: String?
        /// Filters the list of jobs based on job status. Returns only jobs with the specified status.
        public let jobStatus: JobStatus?
        /// Filters the list of jobs based on the time that the job was submitted for processing. Returns only jobs submitted after the specified time. Jobs are returned in descending order, newest to oldest.
        public let submitTimeAfter: Date?
        /// Filters the list of jobs based on the time that the job was submitted for processing. Returns only jobs submitted before the specified time. Jobs are returned in ascending order, oldest to newest.
        public let submitTimeBefore: Date?

        public init(jobName: String? = nil, jobStatus: JobStatus? = nil, submitTimeAfter: Date? = nil, submitTimeBefore: Date? = nil) {
            self.jobName = jobName
            self.jobStatus = jobStatus
            self.submitTimeAfter = submitTimeAfter
            self.submitTimeBefore = submitTimeBefore
        }

        public func validate(name: String) throws {
            try self.validate(self.jobName, name: "jobName", parent: name, max: 256)
            try self.validate(self.jobName, name: "jobName", parent: name, min: 1)
            try self.validate(self.jobName, name: "jobName", parent: name, pattern: "^([\\p{L}\\p{Z}\\p{N}_.:/=+\\-%@]*)$")
        }

        private enum CodingKeys: String, CodingKey {
            case jobName = "JobName"
            case jobStatus = "JobStatus"
            case submitTimeAfter = "SubmitTimeAfter"
            case submitTimeBefore = "SubmitTimeBefore"
        }
    }

    public struct KeyPhrasesDetectionJobProperties: AWSDecodableShape {
        /// The Amazon Resource Name (ARN) that gives Amazon Comprehend read access to your input data.
        public let dataAccessRoleArn: String?
        /// The time that the key phrases detection job completed.
        public let endTime: Date?
        /// The input data configuration that you supplied when you created the key phrases detection job.
        public let inputDataConfig: InputDataConfig?
        /// The Amazon Resource Name (ARN) of the key phrases detection job. It is a unique, fully qualified identifier for the job. It includes the AWS account, Region, and the job ID. The format of the ARN is as follows:  arn::comprehend:::key-phrases-detection-job/  The following is an example job ARN:  arn:aws:comprehend:us-west-2:111122223333:key-phrases-detection-job/1234abcd12ab34cd56ef1234567890ab
        public let jobArn: String?
        /// The identifier assigned to the key phrases detection job.
        public let jobId: String?
        /// The name that you assigned the key phrases detection job.
        public let jobName: String?
        /// The current status of the key phrases detection job. If the status is FAILED, the Message field shows the reason for the failure.
        public let jobStatus: JobStatus?
        /// The language code of the input documents.
        public let languageCode: LanguageCode?
        /// A description of the status of a job.
        public let message: String?
        /// The output data configuration that you supplied when you created the key phrases detection job.
        public let outputDataConfig: OutputDataConfig?
        /// The time that the key phrases detection job was submitted for processing.
        public let submitTime: Date?
        /// ID for the AWS Key Management Service (KMS) key that Amazon Comprehend uses to encrypt data on the storage volume attached to the ML compute instance(s) that process the analysis job. The VolumeKmsKeyId can be either of the following formats:   KMS Key ID: "1234abcd-12ab-34cd-56ef-1234567890ab"    Amazon Resource Name (ARN) of a KMS Key: "arn:aws:kms:us-west-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab"
        public let volumeKmsKeyId: String?
        ///  Configuration parameters for a private Virtual Private Cloud (VPC) containing the resources you are using for your key phrases detection job. For more information, see Amazon VPC.
        public let vpcConfig: VpcConfig?

        public init(dataAccessRoleArn: String? = nil, endTime: Date? = nil, inputDataConfig: InputDataConfig? = nil, jobArn: String? = nil, jobId: String? = nil, jobName: String? = nil, jobStatus: JobStatus? = nil, languageCode: LanguageCode? = nil, message: String? = nil, outputDataConfig: OutputDataConfig? = nil, submitTime: Date? = nil, volumeKmsKeyId: String? = nil, vpcConfig: VpcConfig? = nil) {
            self.dataAccessRoleArn = dataAccessRoleArn
            self.endTime = endTime
            self.inputDataConfig = inputDataConfig
            self.jobArn = jobArn
            self.jobId = jobId
            self.jobName = jobName
            self.jobStatus = jobStatus
            self.languageCode = languageCode
            self.message = message
            self.outputDataConfig = outputDataConfig
            self.submitTime = submitTime
            self.volumeKmsKeyId = volumeKmsKeyId
            self.vpcConfig = vpcConfig
        }

        private enum CodingKeys: String, CodingKey {
            case dataAccessRoleArn = "DataAccessRoleArn"
            case endTime = "EndTime"
            case inputDataConfig = "InputDataConfig"
            case jobArn = "JobArn"
            case jobId = "JobId"
            case jobName = "JobName"
            case jobStatus = "JobStatus"
            case languageCode = "LanguageCode"
            case message = "Message"
            case outputDataConfig = "OutputDataConfig"
            case submitTime = "SubmitTime"
            case volumeKmsKeyId = "VolumeKmsKeyId"
            case vpcConfig = "VpcConfig"
        }
    }

    public struct ListDocumentClassificationJobsRequest: AWSEncodableShape {
        /// Filters the jobs that are returned. You can filter jobs on their names, status, or the date and time that they were submitted. You can only set one filter at a time.
        public let filter: DocumentClassificationJobFilter?
        /// The maximum number of results to return in each page. The default is 100.
        public let maxResults: Int?
        /// Identifies the next page of results to return.
        public let nextToken: String?

        public init(filter: DocumentClassificationJobFilter? = nil, maxResults: Int? = nil, nextToken: String? = nil) {
            self.filter = filter
            self.maxResults = maxResults
            self.nextToken = nextToken
        }

        public func validate(name: String) throws {
            try self.filter?.validate(name: "\(name).filter")
            try self.validate(self.maxResults, name: "maxResults", parent: name, max: 500)
            try self.validate(self.maxResults, name: "maxResults", parent: name, min: 1)
            try self.validate(self.nextToken, name: "nextToken", parent: name, min: 1)
        }

        private enum CodingKeys: String, CodingKey {
            case filter = "Filter"
            case maxResults = "MaxResults"
            case nextToken = "NextToken"
        }
    }

    public struct ListDocumentClassificationJobsResponse: AWSDecodableShape {
        /// A list containing the properties of each job returned.
        public let documentClassificationJobPropertiesList: [DocumentClassificationJobProperties]?
        /// Identifies the next page of results to return.
        public let nextToken: String?

        public init(documentClassificationJobPropertiesList: [DocumentClassificationJobProperties]? = nil, nextToken: String? = nil) {
            self.documentClassificationJobPropertiesList = documentClassificationJobPropertiesList
            self.nextToken = nextToken
        }

        private enum CodingKeys: String, CodingKey {
            case documentClassificationJobPropertiesList = "DocumentClassificationJobPropertiesList"
            case nextToken = "NextToken"
        }
    }

    public struct ListDocumentClassifierSummariesRequest: AWSEncodableShape {
        /// The maximum number of results to return on each page. The default is 100.
        public let maxResults: Int?
        /// Identifies the next page of results to return.
        public let nextToken: String?

        public init(maxResults: Int? = nil, nextToken: String? = nil) {
            self.maxResults = maxResults
            self.nextToken = nextToken
        }

        public func validate(name: String) throws {
            try self.validate(self.maxResults, name: "maxResults", parent: name, max: 500)
            try self.validate(self.maxResults, name: "maxResults", parent: name, min: 1)
            try self.validate(self.nextToken, name: "nextToken", parent: name, min: 1)
        }

        private enum CodingKeys: String, CodingKey {
            case maxResults = "MaxResults"
            case nextToken = "NextToken"
        }
    }

    public struct ListDocumentClassifierSummariesResponse: AWSDecodableShape {
        /// The list of summaries of document classifiers.
        public let documentClassifierSummariesList: [DocumentClassifierSummary]?
        /// Identifies the next page of results to return.
        public let nextToken: String?

        public init(documentClassifierSummariesList: [DocumentClassifierSummary]? = nil, nextToken: String? = nil) {
            self.documentClassifierSummariesList = documentClassifierSummariesList
            self.nextToken = nextToken
        }

        private enum CodingKeys: String, CodingKey {
            case documentClassifierSummariesList = "DocumentClassifierSummariesList"
            case nextToken = "NextToken"
        }
    }

    public struct ListDocumentClassifiersRequest: AWSEncodableShape {
        /// Filters the jobs that are returned. You can filter jobs on their name, status, or the date and time that they were submitted. You can only set one filter at a time.
        public let filter: DocumentClassifierFilter?
        /// The maximum number of results to return in each page. The default is 100.
        public let maxResults: Int?
        /// Identifies the next page of results to return.
        public let nextToken: String?

        public init(filter: DocumentClassifierFilter? = nil, maxResults: Int? = nil, nextToken: String? = nil) {
            self.filter = filter
            self.maxResults = maxResults
            self.nextToken = nextToken
        }

        public func validate(name: String) throws {
            try self.filter?.validate(name: "\(name).filter")
            try self.validate(self.maxResults, name: "maxResults", parent: name, max: 500)
            try self.validate(self.maxResults, name: "maxResults", parent: name, min: 1)
            try self.validate(self.nextToken, name: "nextToken", parent: name, min: 1)
        }

        private enum CodingKeys: String, CodingKey {
            case filter = "Filter"
            case maxResults = "MaxResults"
            case nextToken = "NextToken"
        }
    }

    public struct ListDocumentClassifiersResponse: AWSDecodableShape {
        /// A list containing the properties of each job returned.
        public let documentClassifierPropertiesList: [DocumentClassifierProperties]?
        /// Identifies the next page of results to return.
        public let nextToken: String?

        public init(documentClassifierPropertiesList: [DocumentClassifierProperties]? = nil, nextToken: String? = nil) {
            self.documentClassifierPropertiesList = documentClassifierPropertiesList
            self.nextToken = nextToken
        }

        private enum CodingKeys: String, CodingKey {
            case documentClassifierPropertiesList = "DocumentClassifierPropertiesList"
            case nextToken = "NextToken"
        }
    }

    public struct ListDominantLanguageDetectionJobsRequest: AWSEncodableShape {
        /// Filters that jobs that are returned. You can filter jobs on their name, status, or the date and time that they were submitted. You can only set one filter at a time.
        public let filter: DominantLanguageDetectionJobFilter?
        /// The maximum number of results to return in each page. The default is 100.
        public let maxResults: Int?
        /// Identifies the next page of results to return.
        public let nextToken: String?

        public init(filter: DominantLanguageDetectionJobFilter? = nil, maxResults: Int? = nil, nextToken: String? = nil) {
            self.filter = filter
            self.maxResults = maxResults
            self.nextToken = nextToken
        }

        public func validate(name: String) throws {
            try self.filter?.validate(name: "\(name).filter")
            try self.validate(self.maxResults, name: "maxResults", parent: name, max: 500)
            try self.validate(self.maxResults, name: "maxResults", parent: name, min: 1)
            try self.validate(self.nextToken, name: "nextToken", parent: name, min: 1)
        }

        private enum CodingKeys: String, CodingKey {
            case filter = "Filter"
            case maxResults = "MaxResults"
            case nextToken = "NextToken"
        }
    }

    public struct ListDominantLanguageDetectionJobsResponse: AWSDecodableShape {
        /// A list containing the properties of each job that is returned.
        public let dominantLanguageDetectionJobPropertiesList: [DominantLanguageDetectionJobProperties]?
        /// Identifies the next page of results to return.
        public let nextToken: String?

        public init(dominantLanguageDetectionJobPropertiesList: [DominantLanguageDetectionJobProperties]? = nil, nextToken: String? = nil) {
            self.dominantLanguageDetectionJobPropertiesList = dominantLanguageDetectionJobPropertiesList
            self.nextToken = nextToken
        }

        private enum CodingKeys: String, CodingKey {
            case dominantLanguageDetectionJobPropertiesList = "DominantLanguageDetectionJobPropertiesList"
            case nextToken = "NextToken"
        }
    }

    public struct ListEndpointsRequest: AWSEncodableShape {
        /// Filters the endpoints that are returned. You can filter endpoints on their name, model, status, or the date and time that they were created. You can only set one filter at a time.
        public let filter: EndpointFilter?
        /// The maximum number of results to return in each page. The default is 100.
        public let maxResults: Int?
        /// Identifies the next page of results to return.
        public let nextToken: String?

        public init(filter: EndpointFilter? = nil, maxResults: Int? = nil, nextToken: String? = nil) {
            self.filter = filter
            self.maxResults = maxResults
            self.nextToken = nextToken
        }

        public func validate(name: String) throws {
            try self.filter?.validate(name: "\(name).filter")
            try self.validate(self.maxResults, name: "maxResults", parent: name, max: 500)
            try self.validate(self.maxResults, name: "maxResults", parent: name, min: 1)
            try self.validate(self.nextToken, name: "nextToken", parent: name, min: 1)
        }

        private enum CodingKeys: String, CodingKey {
            case filter = "Filter"
            case maxResults = "MaxResults"
            case nextToken = "NextToken"
        }
    }

    public struct ListEndpointsResponse: AWSDecodableShape {
        /// Displays a list of endpoint properties being retrieved by the service in response to the request.
        public let endpointPropertiesList: [EndpointProperties]?
        /// Identifies the next page of results to return.
        public let nextToken: String?

        public init(endpointPropertiesList: [EndpointProperties]? = nil, nextToken: String? = nil) {
            self.endpointPropertiesList = endpointPropertiesList
            self.nextToken = nextToken
        }

        private enum CodingKeys: String, CodingKey {
            case endpointPropertiesList = "EndpointPropertiesList"
            case nextToken = "NextToken"
        }
    }

    public struct ListEntitiesDetectionJobsRequest: AWSEncodableShape {
        /// Filters the jobs that are returned. You can filter jobs on their name, status, or the date and time that they were submitted. You can only set one filter at a time.
        public let filter: EntitiesDetectionJobFilter?
        /// The maximum number of results to return in each page. The default is 100.
        public let maxResults: Int?
        /// Identifies the next page of results to return.
        public let nextToken: String?

        public init(filter: EntitiesDetectionJobFilter? = nil, maxResults: Int? = nil, nextToken: String? = nil) {
            self.filter = filter
            self.maxResults = maxResults
            self.nextToken = nextToken
        }

        public func validate(name: String) throws {
            try self.filter?.validate(name: "\(name).filter")
            try self.validate(self.maxResults, name: "maxResults", parent: name, max: 500)
            try self.validate(self.maxResults, name: "maxResults", parent: name, min: 1)
            try self.validate(self.nextToken, name: "nextToken", parent: name, min: 1)
        }

        private enum CodingKeys: String, CodingKey {
            case filter = "Filter"
            case maxResults = "MaxResults"
            case nextToken = "NextToken"
        }
    }

    public struct ListEntitiesDetectionJobsResponse: AWSDecodableShape {
        /// A list containing the properties of each job that is returned.
        public let entitiesDetectionJobPropertiesList: [EntitiesDetectionJobProperties]?
        /// Identifies the next page of results to return.
        public let nextToken: String?

        public init(entitiesDetectionJobPropertiesList: [EntitiesDetectionJobProperties]? = nil, nextToken: String? = nil) {
            self.entitiesDetectionJobPropertiesList = entitiesDetectionJobPropertiesList
            self.nextToken = nextToken
        }

        private enum CodingKeys: String, CodingKey {
            case entitiesDetectionJobPropertiesList = "EntitiesDetectionJobPropertiesList"
            case nextToken = "NextToken"
        }
    }

    public struct ListEntityRecognizerSummariesRequest: AWSEncodableShape {
        /// The maximum number of results to return on each page. The default is 100.
        public let maxResults: Int?
        /// Identifies the next page of results to return.
        public let nextToken: String?

        public init(maxResults: Int? = nil, nextToken: String? = nil) {
            self.maxResults = maxResults
            self.nextToken = nextToken
        }

        public func validate(name: String) throws {
            try self.validate(self.maxResults, name: "maxResults", parent: name, max: 500)
            try self.validate(self.maxResults, name: "maxResults", parent: name, min: 1)
            try self.validate(self.nextToken, name: "nextToken", parent: name, min: 1)
        }

        private enum CodingKeys: String, CodingKey {
            case maxResults = "MaxResults"
            case nextToken = "NextToken"
        }
    }

    public struct ListEntityRecognizerSummariesResponse: AWSDecodableShape {
        /// The list entity recognizer summaries.
        public let entityRecognizerSummariesList: [EntityRecognizerSummary]?
        /// The list entity recognizer summaries.
        public let nextToken: String?

        public init(entityRecognizerSummariesList: [EntityRecognizerSummary]? = nil, nextToken: String? = nil) {
            self.entityRecognizerSummariesList = entityRecognizerSummariesList
            self.nextToken = nextToken
        }

        private enum CodingKeys: String, CodingKey {
            case entityRecognizerSummariesList = "EntityRecognizerSummariesList"
            case nextToken = "NextToken"
        }
    }

    public struct ListEntityRecognizersRequest: AWSEncodableShape {
        /// Filters the list of entities returned. You can filter on Status, SubmitTimeBefore, or SubmitTimeAfter. You can only set one filter at a time.
        public let filter: EntityRecognizerFilter?
        ///  The maximum number of results to return on each page. The default is 100.
        public let maxResults: Int?
        /// Identifies the next page of results to return.
        public let nextToken: String?

        public init(filter: EntityRecognizerFilter? = nil, maxResults: Int? = nil, nextToken: String? = nil) {
            self.filter = filter
            self.maxResults = maxResults
            self.nextToken = nextToken
        }

        public func validate(name: String) throws {
            try self.filter?.validate(name: "\(name).filter")
            try self.validate(self.maxResults, name: "maxResults", parent: name, max: 500)
            try self.validate(self.maxResults, name: "maxResults", parent: name, min: 1)
            try self.validate(self.nextToken, name: "nextToken", parent: name, min: 1)
        }

        private enum CodingKeys: String, CodingKey {
            case filter = "Filter"
            case maxResults = "MaxResults"
            case nextToken = "NextToken"
        }
    }

    public struct ListEntityRecognizersResponse: AWSDecodableShape {
        /// The list of properties of an entity recognizer.
        public let entityRecognizerPropertiesList: [EntityRecognizerProperties]?
        /// Identifies the next page of results to return.
        public let nextToken: String?

        public init(entityRecognizerPropertiesList: [EntityRecognizerProperties]? = nil, nextToken: String? = nil) {
            self.entityRecognizerPropertiesList = entityRecognizerPropertiesList
            self.nextToken = nextToken
        }

        private enum CodingKeys: String, CodingKey {
            case entityRecognizerPropertiesList = "EntityRecognizerPropertiesList"
            case nextToken = "NextToken"
        }
    }

    public struct ListEventsDetectionJobsRequest: AWSEncodableShape {
        /// Filters the jobs that are returned. You can filter jobs on their name, status, or the date and time that they were submitted. You can only set one filter at a time.
        public let filter: EventsDetectionJobFilter?
        /// The maximum number of results to return in each page.
        public let maxResults: Int?
        /// Identifies the next page of results to return.
        public let nextToken: String?

        public init(filter: EventsDetectionJobFilter? = nil, maxResults: Int? = nil, nextToken: String? = nil) {
            self.filter = filter
            self.maxResults = maxResults
            self.nextToken = nextToken
        }

        public func validate(name: String) throws {
            try self.filter?.validate(name: "\(name).filter")
            try self.validate(self.maxResults, name: "maxResults", parent: name, max: 500)
            try self.validate(self.maxResults, name: "maxResults", parent: name, min: 1)
            try self.validate(self.nextToken, name: "nextToken", parent: name, min: 1)
        }

        private enum CodingKeys: String, CodingKey {
            case filter = "Filter"
            case maxResults = "MaxResults"
            case nextToken = "NextToken"
        }
    }

    public struct ListEventsDetectionJobsResponse: AWSDecodableShape {
        /// A list containing the properties of each job that is returned.
        public let eventsDetectionJobPropertiesList: [EventsDetectionJobProperties]?
        /// Identifies the next page of results to return.
        public let nextToken: String?

        public init(eventsDetectionJobPropertiesList: [EventsDetectionJobProperties]? = nil, nextToken: String? = nil) {
            self.eventsDetectionJobPropertiesList = eventsDetectionJobPropertiesList
            self.nextToken = nextToken
        }

        private enum CodingKeys: String, CodingKey {
            case eventsDetectionJobPropertiesList = "EventsDetectionJobPropertiesList"
            case nextToken = "NextToken"
        }
    }

    public struct ListKeyPhrasesDetectionJobsRequest: AWSEncodableShape {
        /// Filters the jobs that are returned. You can filter jobs on their name, status, or the date and time that they were submitted. You can only set one filter at a time.
        public let filter: KeyPhrasesDetectionJobFilter?
        /// The maximum number of results to return in each page. The default is 100.
        public let maxResults: Int?
        /// Identifies the next page of results to return.
        public let nextToken: String?

        public init(filter: KeyPhrasesDetectionJobFilter? = nil, maxResults: Int? = nil, nextToken: String? = nil) {
            self.filter = filter
            self.maxResults = maxResults
            self.nextToken = nextToken
        }

        public func validate(name: String) throws {
            try self.filter?.validate(name: "\(name).filter")
            try self.validate(self.maxResults, name: "maxResults", parent: name, max: 500)
            try self.validate(self.maxResults, name: "maxResults", parent: name, min: 1)
            try self.validate(self.nextToken, name: "nextToken", parent: name, min: 1)
        }

        private enum CodingKeys: String, CodingKey {
            case filter = "Filter"
            case maxResults = "MaxResults"
            case nextToken = "NextToken"
        }
    }

    public struct ListKeyPhrasesDetectionJobsResponse: AWSDecodableShape {
        /// A list containing the properties of each job that is returned.
        public let keyPhrasesDetectionJobPropertiesList: [KeyPhrasesDetectionJobProperties]?
        /// Identifies the next page of results to return.
        public let nextToken: String?

        public init(keyPhrasesDetectionJobPropertiesList: [KeyPhrasesDetectionJobProperties]? = nil, nextToken: String? = nil) {
            self.keyPhrasesDetectionJobPropertiesList = keyPhrasesDetectionJobPropertiesList
            self.nextToken = nextToken
        }

        private enum CodingKeys: String, CodingKey {
            case keyPhrasesDetectionJobPropertiesList = "KeyPhrasesDetectionJobPropertiesList"
            case nextToken = "NextToken"
        }
    }

    public struct ListPiiEntitiesDetectionJobsRequest: AWSEncodableShape {
        /// Filters the jobs that are returned. You can filter jobs on their name, status, or the date and time that they were submitted. You can only set one filter at a time.
        public let filter: PiiEntitiesDetectionJobFilter?
        /// The maximum number of results to return in each page.
        public let maxResults: Int?
        /// Identifies the next page of results to return.
        public let nextToken: String?

        public init(filter: PiiEntitiesDetectionJobFilter? = nil, maxResults: Int? = nil, nextToken: String? = nil) {
            self.filter = filter
            self.maxResults = maxResults
            self.nextToken = nextToken
        }

        public func validate(name: String) throws {
            try self.filter?.validate(name: "\(name).filter")
            try self.validate(self.maxResults, name: "maxResults", parent: name, max: 500)
            try self.validate(self.maxResults, name: "maxResults", parent: name, min: 1)
            try self.validate(self.nextToken, name: "nextToken", parent: name, min: 1)
        }

        private enum CodingKeys: String, CodingKey {
            case filter = "Filter"
            case maxResults = "MaxResults"
            case nextToken = "NextToken"
        }
    }

    public struct ListPiiEntitiesDetectionJobsResponse: AWSDecodableShape {
        /// Identifies the next page of results to return.
        public let nextToken: String?
        /// A list containing the properties of each job that is returned.
        public let piiEntitiesDetectionJobPropertiesList: [PiiEntitiesDetectionJobProperties]?

        public init(nextToken: String? = nil, piiEntitiesDetectionJobPropertiesList: [PiiEntitiesDetectionJobProperties]? = nil) {
            self.nextToken = nextToken
            self.piiEntitiesDetectionJobPropertiesList = piiEntitiesDetectionJobPropertiesList
        }

        private enum CodingKeys: String, CodingKey {
            case nextToken = "NextToken"
            case piiEntitiesDetectionJobPropertiesList = "PiiEntitiesDetectionJobPropertiesList"
        }
    }

    public struct ListSentimentDetectionJobsRequest: AWSEncodableShape {
        /// Filters the jobs that are returned. You can filter jobs on their name, status, or the date and time that they were submitted. You can only set one filter at a time.
        public let filter: SentimentDetectionJobFilter?
        /// The maximum number of results to return in each page. The default is 100.
        public let maxResults: Int?
        /// Identifies the next page of results to return.
        public let nextToken: String?

        public init(filter: SentimentDetectionJobFilter? = nil, maxResults: Int? = nil, nextToken: String? = nil) {
            self.filter = filter
            self.maxResults = maxResults
            self.nextToken = nextToken
        }

        public func validate(name: String) throws {
            try self.filter?.validate(name: "\(name).filter")
            try self.validate(self.maxResults, name: "maxResults", parent: name, max: 500)
            try self.validate(self.maxResults, name: "maxResults", parent: name, min: 1)
            try self.validate(self.nextToken, name: "nextToken", parent: name, min: 1)
        }

        private enum CodingKeys: String, CodingKey {
            case filter = "Filter"
            case maxResults = "MaxResults"
            case nextToken = "NextToken"
        }
    }

    public struct ListSentimentDetectionJobsResponse: AWSDecodableShape {
        /// Identifies the next page of results to return.
        public let nextToken: String?
        /// A list containing the properties of each job that is returned.
        public let sentimentDetectionJobPropertiesList: [SentimentDetectionJobProperties]?

        public init(nextToken: String? = nil, sentimentDetectionJobPropertiesList: [SentimentDetectionJobProperties]? = nil) {
            self.nextToken = nextToken
            self.sentimentDetectionJobPropertiesList = sentimentDetectionJobPropertiesList
        }

        private enum CodingKeys: String, CodingKey {
            case nextToken = "NextToken"
            case sentimentDetectionJobPropertiesList = "SentimentDetectionJobPropertiesList"
        }
    }

    public struct ListTagsForResourceRequest: AWSEncodableShape {
        /// The Amazon Resource Name (ARN) of the given Amazon Comprehend resource you are querying.
        public let resourceArn: String

        public init(resourceArn: String) {
            self.resourceArn = resourceArn
        }

        public func validate(name: String) throws {
            try self.validate(self.resourceArn, name: "resourceArn", parent: name, max: 256)
            try self.validate(self.resourceArn, name: "resourceArn", parent: name, pattern: "^arn:aws(-[^:]+)?:comprehend:[a-zA-Z0-9-]*:[0-9]{12}:[a-zA-Z0-9-]{1,64}/[a-zA-Z0-9](-*[a-zA-Z0-9])*(/version/[a-zA-Z0-9](-*[a-zA-Z0-9])*)?$")
        }

        private enum CodingKeys: String, CodingKey {
            case resourceArn = "ResourceArn"
        }
    }

    public struct ListTagsForResourceResponse: AWSDecodableShape {
        /// The Amazon Resource Name (ARN) of the given Amazon Comprehend resource you are querying.
        public let resourceArn: String?
        /// Tags associated with the Amazon Comprehend resource being queried. A tag is a key-value pair that adds as a metadata to a resource used by Amazon Comprehend. For example, a tag with "Sales" as the key might be added to a resource to indicate its use by the sales department.
        public let tags: [Tag]?

        public init(resourceArn: String? = nil, tags: [Tag]? = nil) {
            self.resourceArn = resourceArn
            self.tags = tags
        }

        private enum CodingKeys: String, CodingKey {
            case resourceArn = "ResourceArn"
            case tags = "Tags"
        }
    }

    public struct ListTargetedSentimentDetectionJobsRequest: AWSEncodableShape {
        /// Filters the jobs that are returned. You can filter jobs on their name, status, or the date and time that they were submitted. You can only set one filter at a time.
        public let filter: TargetedSentimentDetectionJobFilter?
        /// The maximum number of results to return in each page. The default is 100.
        public let maxResults: Int?
        /// Identifies the next page of results to return.
        public let nextToken: String?

        public init(filter: TargetedSentimentDetectionJobFilter? = nil, maxResults: Int? = nil, nextToken: String? = nil) {
            self.filter = filter
            self.maxResults = maxResults
            self.nextToken = nextToken
        }

        public func validate(name: String) throws {
            try self.filter?.validate(name: "\(name).filter")
            try self.validate(self.maxResults, name: "maxResults", parent: name, max: 500)
            try self.validate(self.maxResults, name: "maxResults", parent: name, min: 1)
            try self.validate(self.nextToken, name: "nextToken", parent: name, min: 1)
        }

        private enum CodingKeys: String, CodingKey {
            case filter = "Filter"
            case maxResults = "MaxResults"
            case nextToken = "NextToken"
        }
    }

    public struct ListTargetedSentimentDetectionJobsResponse: AWSDecodableShape {
        /// Identifies the next page of results to return.
        public let nextToken: String?
        /// A list containing the properties of each job that is returned.
        public let targetedSentimentDetectionJobPropertiesList: [TargetedSentimentDetectionJobProperties]?

        public init(nextToken: String? = nil, targetedSentimentDetectionJobPropertiesList: [TargetedSentimentDetectionJobProperties]? = nil) {
            self.nextToken = nextToken
            self.targetedSentimentDetectionJobPropertiesList = targetedSentimentDetectionJobPropertiesList
        }

        private enum CodingKeys: String, CodingKey {
            case nextToken = "NextToken"
            case targetedSentimentDetectionJobPropertiesList = "TargetedSentimentDetectionJobPropertiesList"
        }
    }

    public struct ListTopicsDetectionJobsRequest: AWSEncodableShape {
        /// Filters the jobs that are returned. Jobs can be filtered on their name, status, or the date and time that they were submitted. You can set only one filter at a time.
        public let filter: TopicsDetectionJobFilter?
        /// The maximum number of results to return in each page. The default is 100.
        public let maxResults: Int?
        /// Identifies the next page of results to return.
        public let nextToken: String?

        public init(filter: TopicsDetectionJobFilter? = nil, maxResults: Int? = nil, nextToken: String? = nil) {
            self.filter = filter
            self.maxResults = maxResults
            self.nextToken = nextToken
        }

        public func validate(name: String) throws {
            try self.filter?.validate(name: "\(name).filter")
            try self.validate(self.maxResults, name: "maxResults", parent: name, max: 500)
            try self.validate(self.maxResults, name: "maxResults", parent: name, min: 1)
            try self.validate(self.nextToken, name: "nextToken", parent: name, min: 1)
        }

        private enum CodingKeys: String, CodingKey {
            case filter = "Filter"
            case maxResults = "MaxResults"
            case nextToken = "NextToken"
        }
    }

    public struct ListTopicsDetectionJobsResponse: AWSDecodableShape {
        /// Identifies the next page of results to return.
        public let nextToken: String?
        /// A list containing the properties of each job that is returned.
        public let topicsDetectionJobPropertiesList: [TopicsDetectionJobProperties]?

        public init(nextToken: String? = nil, topicsDetectionJobPropertiesList: [TopicsDetectionJobProperties]? = nil) {
            self.nextToken = nextToken
            self.topicsDetectionJobPropertiesList = topicsDetectionJobPropertiesList
        }

        private enum CodingKeys: String, CodingKey {
            case nextToken = "NextToken"
            case topicsDetectionJobPropertiesList = "TopicsDetectionJobPropertiesList"
        }
    }

    public struct MentionSentiment: AWSDecodableShape {
        /// The sentiment of the mention.
        public let sentiment: SentimentType?
        public let sentimentScore: SentimentScore?

        public init(sentiment: SentimentType? = nil, sentimentScore: SentimentScore? = nil) {
            self.sentiment = sentiment
            self.sentimentScore = sentimentScore
        }

        private enum CodingKeys: String, CodingKey {
            case sentiment = "Sentiment"
            case sentimentScore = "SentimentScore"
        }
    }

    public struct OutputDataConfig: AWSEncodableShape & AWSDecodableShape {
        /// ID for the AWS Key Management Service (KMS) key that Amazon Comprehend uses to encrypt the output results from an analysis job. The KmsKeyId can be one of the following formats:   KMS Key ID: "1234abcd-12ab-34cd-56ef-1234567890ab"    Amazon Resource Name (ARN) of a KMS Key: "arn:aws:kms:us-west-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab"    KMS Key Alias: "alias/ExampleAlias"    ARN of a KMS Key Alias: "arn:aws:kms:us-west-2:111122223333:alias/ExampleAlias"
        public let kmsKeyId: String?
        /// When you use the OutputDataConfig object with asynchronous operations, you specify the Amazon S3 location where you want to write the output data. The URI must be in the same region as the API endpoint that you are calling. The location is used as the prefix for the actual location of the output file. When the topic detection job is finished, the service creates an output file in a directory specific to the job. The S3Uri field contains the location of the output file, called output.tar.gz. It is a compressed archive that contains the ouput of the operation.  For a PII entity detection job, the output file is plain text, not a compressed archive. The output file name is the same as the input file, with .out appended at the end.
        public let s3Uri: String

        public init(kmsKeyId: String? = nil, s3Uri: String) {
            self.kmsKeyId = kmsKeyId
            self.s3Uri = s3Uri
        }

        public func validate(name: String) throws {
            try self.validate(self.kmsKeyId, name: "kmsKeyId", parent: name, max: 2048)
            try self.validate(self.kmsKeyId, name: "kmsKeyId", parent: name, pattern: "^\\p{ASCII}+$")
            try self.validate(self.s3Uri, name: "s3Uri", parent: name, max: 1024)
            try self.validate(self.s3Uri, name: "s3Uri", parent: name, pattern: "^s3://[a-z0-9][\\.\\-a-z0-9]{1,61}[a-z0-9](/.*)?$")
        }

        private enum CodingKeys: String, CodingKey {
            case kmsKeyId = "KmsKeyId"
            case s3Uri = "S3Uri"
        }
    }

    public struct PartOfSpeechTag: AWSDecodableShape {
        /// The confidence that Amazon Comprehend has that the part of speech was correctly identified.
        public let score: Float?
        /// Identifies the part of speech that the token represents.
        public let tag: PartOfSpeechTagType?

        public init(score: Float? = nil, tag: PartOfSpeechTagType? = nil) {
            self.score = score
            self.tag = tag
        }

        private enum CodingKeys: String, CodingKey {
            case score = "Score"
            case tag = "Tag"
        }
    }

    public struct PiiEntitiesDetectionJobFilter: AWSEncodableShape {
        /// Filters on the name of the job.
        public let jobName: String?
        /// Filters the list of jobs based on job status. Returns only jobs with the specified status.
        public let jobStatus: JobStatus?
        /// Filters the list of jobs based on the time that the job was submitted for processing. Returns only jobs submitted after the specified time. Jobs are returned in descending order, newest to oldest.
        public let submitTimeAfter: Date?
        /// Filters the list of jobs based on the time that the job was submitted for processing. Returns only jobs submitted before the specified time. Jobs are returned in ascending order, oldest to newest.
        public let submitTimeBefore: Date?

        public init(jobName: String? = nil, jobStatus: JobStatus? = nil, submitTimeAfter: Date? = nil, submitTimeBefore: Date? = nil) {
            self.jobName = jobName
            self.jobStatus = jobStatus
            self.submitTimeAfter = submitTimeAfter
            self.submitTimeBefore = submitTimeBefore
        }

        public func validate(name: String) throws {
            try self.validate(self.jobName, name: "jobName", parent: name, max: 256)
            try self.validate(self.jobName, name: "jobName", parent: name, min: 1)
            try self.validate(self.jobName, name: "jobName", parent: name, pattern: "^([\\p{L}\\p{Z}\\p{N}_.:/=+\\-%@]*)$")
        }

        private enum CodingKeys: String, CodingKey {
            case jobName = "JobName"
            case jobStatus = "JobStatus"
            case submitTimeAfter = "SubmitTimeAfter"
            case submitTimeBefore = "SubmitTimeBefore"
        }
    }

    public struct PiiEntitiesDetectionJobProperties: AWSDecodableShape {
        /// The Amazon Resource Name (ARN) that gives Amazon Comprehend read access to your input data.
        public let dataAccessRoleArn: String?
        /// The time that the PII entities detection job completed.
        public let endTime: Date?
        /// The input properties for a PII entities detection job.
        public let inputDataConfig: InputDataConfig?
        /// The Amazon Resource Name (ARN) of the PII entities detection job. It is a unique, fully qualified identifier for the job. It includes the AWS account, Region, and the job ID. The format of the ARN is as follows:  arn::comprehend:::pii-entities-detection-job/  The following is an example job ARN:  arn:aws:comprehend:us-west-2:111122223333:pii-entities-detection-job/1234abcd12ab34cd56ef1234567890ab
        public let jobArn: String?
        /// The identifier assigned to the PII entities detection job.
        public let jobId: String?
        /// The name that you assigned the PII entities detection job.
        public let jobName: String?
        /// The current status of the PII entities detection job. If the status is FAILED, the Message field shows the reason for the failure.
        public let jobStatus: JobStatus?
        /// The language code of the input documents
        public let languageCode: LanguageCode?
        /// A description of the status of a job.
        public let message: String?
        /// Specifies whether the output provides the locations (offsets) of PII entities or a file in which PII entities are redacted.
        public let mode: PiiEntitiesDetectionMode?
        /// The output data configuration that you supplied when you created the PII entities detection job.
        public let outputDataConfig: PiiOutputDataConfig?
        /// Provides configuration parameters for PII entity redaction. This parameter is required if you set the Mode parameter to ONLY_REDACTION. In that case, you must provide a RedactionConfig definition that includes the PiiEntityTypes parameter.
        public let redactionConfig: RedactionConfig?
        /// The time that the PII entities detection job was submitted for processing.
        public let submitTime: Date?

        public init(dataAccessRoleArn: String? = nil, endTime: Date? = nil, inputDataConfig: InputDataConfig? = nil, jobArn: String? = nil, jobId: String? = nil, jobName: String? = nil, jobStatus: JobStatus? = nil, languageCode: LanguageCode? = nil, message: String? = nil, mode: PiiEntitiesDetectionMode? = nil, outputDataConfig: PiiOutputDataConfig? = nil, redactionConfig: RedactionConfig? = nil, submitTime: Date? = nil) {
            self.dataAccessRoleArn = dataAccessRoleArn
            self.endTime = endTime
            self.inputDataConfig = inputDataConfig
            self.jobArn = jobArn
            self.jobId = jobId
            self.jobName = jobName
            self.jobStatus = jobStatus
            self.languageCode = languageCode
            self.message = message
            self.mode = mode
            self.outputDataConfig = outputDataConfig
            self.redactionConfig = redactionConfig
            self.submitTime = submitTime
        }

        private enum CodingKeys: String, CodingKey {
            case dataAccessRoleArn = "DataAccessRoleArn"
            case endTime = "EndTime"
            case inputDataConfig = "InputDataConfig"
            case jobArn = "JobArn"
            case jobId = "JobId"
            case jobName = "JobName"
            case jobStatus = "JobStatus"
            case languageCode = "LanguageCode"
            case message = "Message"
            case mode = "Mode"
            case outputDataConfig = "OutputDataConfig"
            case redactionConfig = "RedactionConfig"
            case submitTime = "SubmitTime"
        }
    }

    public struct PiiEntity: AWSDecodableShape {
        /// The zero-based offset from the beginning of the source text to the first character in the entity.
        public let beginOffset: Int?
        /// The zero-based offset from the beginning of the source text to the last character in the entity.
        public let endOffset: Int?
        /// The level of confidence that Amazon Comprehend has in the accuracy of the detection.
        public let score: Float?
        /// The entity's type.
        public let type: PiiEntityType?

        public init(beginOffset: Int? = nil, endOffset: Int? = nil, score: Float? = nil, type: PiiEntityType? = nil) {
            self.beginOffset = beginOffset
            self.endOffset = endOffset
            self.score = score
            self.type = type
        }

        private enum CodingKeys: String, CodingKey {
            case beginOffset = "BeginOffset"
            case endOffset = "EndOffset"
            case score = "Score"
            case type = "Type"
        }
    }

    public struct PiiOutputDataConfig: AWSDecodableShape {
        /// ID for the AWS Key Management Service (KMS) key that Amazon Comprehend uses to encrypt the output results from an analysis job.
        public let kmsKeyId: String?
        /// When you use the PiiOutputDataConfig object with asynchronous operations, you specify the Amazon S3 location where you want to write the output data.   For a PII entity detection job, the output file is plain text, not a compressed archive. The output file name is the same as the input file, with .out appended at the end.
        public let s3Uri: String

        public init(kmsKeyId: String? = nil, s3Uri: String) {
            self.kmsKeyId = kmsKeyId
            self.s3Uri = s3Uri
        }

        private enum CodingKeys: String, CodingKey {
            case kmsKeyId = "KmsKeyId"
            case s3Uri = "S3Uri"
        }
    }

    public struct Point: AWSDecodableShape {
        /// The value of the X coordinate for a point on a polygon
        public let x: Float?
        /// The value of the Y coordinate for a point on a polygon
        public let y: Float?

        public init(x: Float? = nil, y: Float? = nil) {
            self.x = x
            self.y = y
        }

        private enum CodingKeys: String, CodingKey {
            case x = "X"
            case y = "Y"
        }
    }

    public struct PutResourcePolicyRequest: AWSEncodableShape {
        /// The revision ID that Amazon Comprehend assigned to the policy that you are updating. If you are creating a new policy that has no prior version, don't use this parameter. Amazon Comprehend creates the revision ID for you.
        public let policyRevisionId: String?
        /// The Amazon Resource Name (ARN) of the custom model to attach the policy to.
        public let resourceArn: String
        /// The JSON resource-based policy to attach to your custom model. Provide your JSON as a UTF-8 encoded string without line breaks. To provide valid JSON for your policy, enclose the attribute names and values in double quotes. If the JSON body is also enclosed in double quotes, then you must escape the double quotes that are inside the policy:  "{\"attribute\": \"value\", \"attribute\": [\"value\"]}"  To avoid escaping quotes, you can use single quotes to enclose the policy and double quotes to enclose the JSON names and values:  '{"attribute": "value", "attribute": ["value"]}'
        public let resourcePolicy: String

        public init(policyRevisionId: String? = nil, resourceArn: String, resourcePolicy: String) {
            self.policyRevisionId = policyRevisionId
            self.resourceArn = resourceArn
            self.resourcePolicy = resourcePolicy
        }

        public func validate(name: String) throws {
            try self.validate(self.policyRevisionId, name: "policyRevisionId", parent: name, max: 64)
            try self.validate(self.policyRevisionId, name: "policyRevisionId", parent: name, pattern: "^[0-9A-Fa-f]+$")
            try self.validate(self.resourceArn, name: "resourceArn", parent: name, max: 256)
            try self.validate(self.resourceArn, name: "resourceArn", parent: name, pattern: "^arn:aws(-[^:]+)?:comprehend:[a-zA-Z0-9-]*:[0-9]{12}:(document-classifier|entity-recognizer)/[a-zA-Z0-9](-*[a-zA-Z0-9])*(/version/[a-zA-Z0-9](-*[a-zA-Z0-9])*)?$")
            try self.validate(self.resourcePolicy, name: "resourcePolicy", parent: name, max: 20000)
            try self.validate(self.resourcePolicy, name: "resourcePolicy", parent: name, min: 1)
            try self.validate(self.resourcePolicy, name: "resourcePolicy", parent: name, pattern: "^[\\u0009\\u000A\\u000D\\u0020-\\u00FF]+$")
        }

        private enum CodingKeys: String, CodingKey {
            case policyRevisionId = "PolicyRevisionId"
            case resourceArn = "ResourceArn"
            case resourcePolicy = "ResourcePolicy"
        }
    }

    public struct PutResourcePolicyResponse: AWSDecodableShape {
        /// The revision ID of the policy. Each time you modify a policy, Amazon Comprehend assigns a new revision ID, and it deletes the prior version of the policy.
        public let policyRevisionId: String?

        public init(policyRevisionId: String? = nil) {
            self.policyRevisionId = policyRevisionId
        }

        private enum CodingKeys: String, CodingKey {
            case policyRevisionId = "PolicyRevisionId"
        }
    }

    public struct RedactionConfig: AWSEncodableShape & AWSDecodableShape {
        /// A character that replaces each character in the redacted PII entity.
        public let maskCharacter: String?
        /// Specifies whether the PII entity is redacted with the mask character or the entity type.
        public let maskMode: PiiEntitiesDetectionMaskMode?
        /// An array of the types of PII entities that Amazon Comprehend detects in the input text for your request.
        public let piiEntityTypes: [PiiEntityType]?

        public init(maskCharacter: String? = nil, maskMode: PiiEntitiesDetectionMaskMode? = nil, piiEntityTypes: [PiiEntityType]? = nil) {
            self.maskCharacter = maskCharacter
            self.maskMode = maskMode
            self.piiEntityTypes = piiEntityTypes
        }

        public func validate(name: String) throws {
            try self.validate(self.maskCharacter, name: "maskCharacter", parent: name, max: 1)
            try self.validate(self.maskCharacter, name: "maskCharacter", parent: name, min: 1)
            try self.validate(self.maskCharacter, name: "maskCharacter", parent: name, pattern: "^[!@#$%&*]$")
        }

        private enum CodingKeys: String, CodingKey {
            case maskCharacter = "MaskCharacter"
            case maskMode = "MaskMode"
            case piiEntityTypes = "PiiEntityTypes"
        }
    }

    public struct RelationshipsListItem: AWSDecodableShape {
        /// Identifers of the child blocks.
        public let ids: [String]?
        /// Only supported relationship is a child relationship.
        public let type: RelationshipType?

        public init(ids: [String]? = nil, type: RelationshipType? = nil) {
            self.ids = ids
            self.type = type
        }

        private enum CodingKeys: String, CodingKey {
            case ids = "Ids"
            case type = "Type"
        }
    }

    public struct SentimentDetectionJobFilter: AWSEncodableShape {
        /// Filters on the name of the job.
        public let jobName: String?
        /// Filters the list of jobs based on job status. Returns only jobs with the specified status.
        public let jobStatus: JobStatus?
        /// Filters the list of jobs based on the time that the job was submitted for processing. Returns only jobs submitted after the specified time. Jobs are returned in descending order, newest to oldest.
        public let submitTimeAfter: Date?
        /// Filters the list of jobs based on the time that the job was submitted for processing. Returns only jobs submitted before the specified time. Jobs are returned in ascending order, oldest to newest.
        public let submitTimeBefore: Date?

        public init(jobName: String? = nil, jobStatus: JobStatus? = nil, submitTimeAfter: Date? = nil, submitTimeBefore: Date? = nil) {
            self.jobName = jobName
            self.jobStatus = jobStatus
            self.submitTimeAfter = submitTimeAfter
            self.submitTimeBefore = submitTimeBefore
        }

        public func validate(name: String) throws {
            try self.validate(self.jobName, name: "jobName", parent: name, max: 256)
            try self.validate(self.jobName, name: "jobName", parent: name, min: 1)
            try self.validate(self.jobName, name: "jobName", parent: name, pattern: "^([\\p{L}\\p{Z}\\p{N}_.:/=+\\-%@]*)$")
        }

        private enum CodingKeys: String, CodingKey {
            case jobName = "JobName"
            case jobStatus = "JobStatus"
            case submitTimeAfter = "SubmitTimeAfter"
            case submitTimeBefore = "SubmitTimeBefore"
        }
    }

    public struct SentimentDetectionJobProperties: AWSDecodableShape {
        /// The Amazon Resource Name (ARN) that gives Amazon Comprehend read access to your input data.
        public let dataAccessRoleArn: String?
        /// The time that the sentiment detection job ended.
        public let endTime: Date?
        /// The input data configuration that you supplied when you created the sentiment detection job.
        public let inputDataConfig: InputDataConfig?
        /// The Amazon Resource Name (ARN) of the sentiment detection job. It is a unique, fully qualified identifier for the job. It includes the AWS account, Region, and the job ID. The format of the ARN is as follows:  arn::comprehend:::sentiment-detection-job/  The following is an example job ARN:  arn:aws:comprehend:us-west-2:111122223333:sentiment-detection-job/1234abcd12ab34cd56ef1234567890ab
        public let jobArn: String?
        /// The identifier assigned to the sentiment detection job.
        public let jobId: String?
        /// The name that you assigned to the sentiment detection job
        public let jobName: String?
        /// The current status of the sentiment detection job. If the status is FAILED, the Messages field shows the reason for the failure.
        public let jobStatus: JobStatus?
        /// The language code of the input documents.
        public let languageCode: LanguageCode?
        /// A description of the status of a job.
        public let message: String?
        /// The output data configuration that you supplied when you created the sentiment detection job.
        public let outputDataConfig: OutputDataConfig?
        /// The time that the sentiment detection job was submitted for processing.
        public let submitTime: Date?
        /// ID for the AWS Key Management Service (KMS) key that Amazon Comprehend uses to encrypt data on the storage volume attached to the ML compute instance(s) that process the analysis job. The VolumeKmsKeyId can be either of the following formats:   KMS Key ID: "1234abcd-12ab-34cd-56ef-1234567890ab"    Amazon Resource Name (ARN) of a KMS Key: "arn:aws:kms:us-west-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab"
        public let volumeKmsKeyId: String?
        ///  Configuration parameters for a private Virtual Private Cloud (VPC) containing the resources you are using for your sentiment detection job. For more information, see Amazon VPC.
        public let vpcConfig: VpcConfig?

        public init(dataAccessRoleArn: String? = nil, endTime: Date? = nil, inputDataConfig: InputDataConfig? = nil, jobArn: String? = nil, jobId: String? = nil, jobName: String? = nil, jobStatus: JobStatus? = nil, languageCode: LanguageCode? = nil, message: String? = nil, outputDataConfig: OutputDataConfig? = nil, submitTime: Date? = nil, volumeKmsKeyId: String? = nil, vpcConfig: VpcConfig? = nil) {
            self.dataAccessRoleArn = dataAccessRoleArn
            self.endTime = endTime
            self.inputDataConfig = inputDataConfig
            self.jobArn = jobArn
            self.jobId = jobId
            self.jobName = jobName
            self.jobStatus = jobStatus
            self.languageCode = languageCode
            self.message = message
            self.outputDataConfig = outputDataConfig
            self.submitTime = submitTime
            self.volumeKmsKeyId = volumeKmsKeyId
            self.vpcConfig = vpcConfig
        }

        private enum CodingKeys: String, CodingKey {
            case dataAccessRoleArn = "DataAccessRoleArn"
            case endTime = "EndTime"
            case inputDataConfig = "InputDataConfig"
            case jobArn = "JobArn"
            case jobId = "JobId"
            case jobName = "JobName"
            case jobStatus = "JobStatus"
            case languageCode = "LanguageCode"
            case message = "Message"
            case outputDataConfig = "OutputDataConfig"
            case submitTime = "SubmitTime"
            case volumeKmsKeyId = "VolumeKmsKeyId"
            case vpcConfig = "VpcConfig"
        }
    }

    public struct SentimentScore: AWSDecodableShape {
        /// The level of confidence that Amazon Comprehend has in the accuracy of its detection of the MIXED sentiment.
        public let mixed: Float?
        /// The level of confidence that Amazon Comprehend has in the accuracy of its detection of the NEGATIVE sentiment.
        public let negative: Float?
        /// The level of confidence that Amazon Comprehend has in the accuracy of its detection of the NEUTRAL sentiment.
        public let neutral: Float?
        /// The level of confidence that Amazon Comprehend has in the accuracy of its detection of the POSITIVE sentiment.
        public let positive: Float?

        public init(mixed: Float? = nil, negative: Float? = nil, neutral: Float? = nil, positive: Float? = nil) {
            self.mixed = mixed
            self.negative = negative
            self.neutral = neutral
            self.positive = positive
        }

        private enum CodingKeys: String, CodingKey {
            case mixed = "Mixed"
            case negative = "Negative"
            case neutral = "Neutral"
            case positive = "Positive"
        }
    }

    public struct StartDocumentClassificationJobRequest: AWSEncodableShape {
        /// A unique identifier for the request. If you do not set the client request token, Amazon Comprehend generates one.
        public let clientRequestToken: String?
        /// The Amazon Resource Name (ARN) of the AWS Identity and Access Management (IAM) role that grants Amazon Comprehend read access to your input data.
        public let dataAccessRoleArn: String
        /// The Amazon Resource Name (ARN) of the document classifier to use to process the job.
        public let documentClassifierArn: String
        /// Specifies the format and location of the input data for the job.
        public let inputDataConfig: InputDataConfig
        /// The identifier of the job.
        public let jobName: String?
        /// Specifies where to send the output files.
        public let outputDataConfig: OutputDataConfig
        /// Tags to be associated with the document classification job. A tag is a key-value pair that adds metadata to a resource used by Amazon Comprehend. For example, a tag with "Sales" as the key might be added to a resource to indicate its use by the sales department.
        public let tags: [Tag]?
        /// ID for the AWS Key Management Service (KMS) key that Amazon Comprehend uses to encrypt data on the storage volume attached to the ML compute instance(s) that process the analysis job. The VolumeKmsKeyId can be either of the following formats:   KMS Key ID: "1234abcd-12ab-34cd-56ef-1234567890ab"    Amazon Resource Name (ARN) of a KMS Key: "arn:aws:kms:us-west-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab"
        public let volumeKmsKeyId: String?
        /// Configuration parameters for an optional private Virtual Private Cloud (VPC) containing the resources you are using for your document classification job. For more information, see Amazon VPC.
        public let vpcConfig: VpcConfig?

        public init(clientRequestToken: String? = StartDocumentClassificationJobRequest.idempotencyToken(), dataAccessRoleArn: String, documentClassifierArn: String, inputDataConfig: InputDataConfig, jobName: String? = nil, outputDataConfig: OutputDataConfig, tags: [Tag]? = nil, volumeKmsKeyId: String? = nil, vpcConfig: VpcConfig? = nil) {
            self.clientRequestToken = clientRequestToken
            self.dataAccessRoleArn = dataAccessRoleArn
            self.documentClassifierArn = documentClassifierArn
            self.inputDataConfig = inputDataConfig
            self.jobName = jobName
            self.outputDataConfig = outputDataConfig
            self.tags = tags
            self.volumeKmsKeyId = volumeKmsKeyId
            self.vpcConfig = vpcConfig
        }

        public func validate(name: String) throws {
            try self.validate(self.clientRequestToken, name: "clientRequestToken", parent: name, max: 64)
            try self.validate(self.clientRequestToken, name: "clientRequestToken", parent: name, min: 1)
            try self.validate(self.clientRequestToken, name: "clientRequestToken", parent: name, pattern: "^[a-zA-Z0-9-]+$")
            try self.validate(self.dataAccessRoleArn, name: "dataAccessRoleArn", parent: name, max: 2048)
            try self.validate(self.dataAccessRoleArn, name: "dataAccessRoleArn", parent: name, min: 20)
            try self.validate(self.dataAccessRoleArn, name: "dataAccessRoleArn", parent: name, pattern: "^arn:aws(-[^:]+)?:iam::[0-9]{12}:role/.+$")
            try self.validate(self.documentClassifierArn, name: "documentClassifierArn", parent: name, max: 256)
            try self.validate(self.documentClassifierArn, name: "documentClassifierArn", parent: name, pattern: "^arn:aws(-[^:]+)?:comprehend:[a-zA-Z0-9-]*:[0-9]{12}:document-classifier/[a-zA-Z0-9](-*[a-zA-Z0-9])*(/version/[a-zA-Z0-9](-*[a-zA-Z0-9])*)?$")
            try self.inputDataConfig.validate(name: "\(name).inputDataConfig")
            try self.validate(self.jobName, name: "jobName", parent: name, max: 256)
            try self.validate(self.jobName, name: "jobName", parent: name, min: 1)
            try self.validate(self.jobName, name: "jobName", parent: name, pattern: "^([\\p{L}\\p{Z}\\p{N}_.:/=+\\-%@]*)$")
            try self.outputDataConfig.validate(name: "\(name).outputDataConfig")
            try self.tags?.forEach {
                try $0.validate(name: "\(name).tags[]")
            }
            try self.validate(self.volumeKmsKeyId, name: "volumeKmsKeyId", parent: name, max: 2048)
            try self.validate(self.volumeKmsKeyId, name: "volumeKmsKeyId", parent: name, pattern: "^\\p{ASCII}+$")
            try self.vpcConfig?.validate(name: "\(name).vpcConfig")
        }

        private enum CodingKeys: String, CodingKey {
            case clientRequestToken = "ClientRequestToken"
            case dataAccessRoleArn = "DataAccessRoleArn"
            case documentClassifierArn = "DocumentClassifierArn"
            case inputDataConfig = "InputDataConfig"
            case jobName = "JobName"
            case outputDataConfig = "OutputDataConfig"
            case tags = "Tags"
            case volumeKmsKeyId = "VolumeKmsKeyId"
            case vpcConfig = "VpcConfig"
        }
    }

    public struct StartDocumentClassificationJobResponse: AWSDecodableShape {
        /// The Amazon Resource Name (ARN) of the document classification job. It is a unique, fully qualified identifier for the job. It includes the AWS account, Region, and the job ID. The format of the ARN is as follows:  arn::comprehend:::document-classification-job/  The following is an example job ARN:  arn:aws:comprehend:us-west-2:111122223333:document-classification-job/1234abcd12ab34cd56ef1234567890ab
        public let jobArn: String?
        /// The identifier generated for the job. To get the status of the job, use this identifier with the  operation.
        public let jobId: String?
        /// The status of the job:   SUBMITTED - The job has been received and queued for processing.   IN_PROGRESS - Amazon Comprehend is processing the job.   COMPLETED - The job was successfully completed and the output is available.   FAILED - The job did not complete. For details, use the  operation.   STOP_REQUESTED - Amazon Comprehend has received a stop request for the job and is processing the request.   STOPPED - The job was successfully stopped without completing.
        public let jobStatus: JobStatus?

        public init(jobArn: String? = nil, jobId: String? = nil, jobStatus: JobStatus? = nil) {
            self.jobArn = jobArn
            self.jobId = jobId
            self.jobStatus = jobStatus
        }

        private enum CodingKeys: String, CodingKey {
            case jobArn = "JobArn"
            case jobId = "JobId"
            case jobStatus = "JobStatus"
        }
    }

    public struct StartDominantLanguageDetectionJobRequest: AWSEncodableShape {
        /// A unique identifier for the request. If you do not set the client request token, Amazon Comprehend generates one.
        public let clientRequestToken: String?
        /// The Amazon Resource Name (ARN) of the AWS Identity and Access Management (IAM) role that grants Amazon Comprehend read access to your input data. For more information, see https://docs.aws.amazon.com/comprehend/latest/dg/access-control-managing-permissions.html#auth-role-permissions.
        public let dataAccessRoleArn: String
        /// Specifies the format and location of the input data for the job.
        public let inputDataConfig: InputDataConfig
        /// An identifier for the job.
        public let jobName: String?
        /// Specifies where to send the output files.
        public let outputDataConfig: OutputDataConfig
        /// Tags to be associated with the dominant language detection job. A tag is a key-value pair that adds metadata to a resource used by Amazon Comprehend. For example, a tag with "Sales" as the key might be added to a resource to indicate its use by the sales department.
        public let tags: [Tag]?
        /// ID for the AWS Key Management Service (KMS) key that Amazon Comprehend uses to encrypt data on the storage volume attached to the ML compute instance(s) that process the analysis job. The VolumeKmsKeyId can be either of the following formats:   KMS Key ID: "1234abcd-12ab-34cd-56ef-1234567890ab"    Amazon Resource Name (ARN) of a KMS Key: "arn:aws:kms:us-west-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab"
        public let volumeKmsKeyId: String?
        /// Configuration parameters for an optional private Virtual Private Cloud (VPC) containing the resources you are using for your dominant language detection job. For more information, see Amazon VPC.
        public let vpcConfig: VpcConfig?

        public init(clientRequestToken: String? = StartDominantLanguageDetectionJobRequest.idempotencyToken(), dataAccessRoleArn: String, inputDataConfig: InputDataConfig, jobName: String? = nil, outputDataConfig: OutputDataConfig, tags: [Tag]? = nil, volumeKmsKeyId: String? = nil, vpcConfig: VpcConfig? = nil) {
            self.clientRequestToken = clientRequestToken
            self.dataAccessRoleArn = dataAccessRoleArn
            self.inputDataConfig = inputDataConfig
            self.jobName = jobName
            self.outputDataConfig = outputDataConfig
            self.tags = tags
            self.volumeKmsKeyId = volumeKmsKeyId
            self.vpcConfig = vpcConfig
        }

        public func validate(name: String) throws {
            try self.validate(self.clientRequestToken, name: "clientRequestToken", parent: name, max: 64)
            try self.validate(self.clientRequestToken, name: "clientRequestToken", parent: name, min: 1)
            try self.validate(self.clientRequestToken, name: "clientRequestToken", parent: name, pattern: "^[a-zA-Z0-9-]+$")
            try self.validate(self.dataAccessRoleArn, name: "dataAccessRoleArn", parent: name, max: 2048)
            try self.validate(self.dataAccessRoleArn, name: "dataAccessRoleArn", parent: name, min: 20)
            try self.validate(self.dataAccessRoleArn, name: "dataAccessRoleArn", parent: name, pattern: "^arn:aws(-[^:]+)?:iam::[0-9]{12}:role/.+$")
            try self.inputDataConfig.validate(name: "\(name).inputDataConfig")
            try self.validate(self.jobName, name: "jobName", parent: name, max: 256)
            try self.validate(self.jobName, name: "jobName", parent: name, min: 1)
            try self.validate(self.jobName, name: "jobName", parent: name, pattern: "^([\\p{L}\\p{Z}\\p{N}_.:/=+\\-%@]*)$")
            try self.outputDataConfig.validate(name: "\(name).outputDataConfig")
            try self.tags?.forEach {
                try $0.validate(name: "\(name).tags[]")
            }
            try self.validate(self.volumeKmsKeyId, name: "volumeKmsKeyId", parent: name, max: 2048)
            try self.validate(self.volumeKmsKeyId, name: "volumeKmsKeyId", parent: name, pattern: "^\\p{ASCII}+$")
            try self.vpcConfig?.validate(name: "\(name).vpcConfig")
        }

        private enum CodingKeys: String, CodingKey {
            case clientRequestToken = "ClientRequestToken"
            case dataAccessRoleArn = "DataAccessRoleArn"
            case inputDataConfig = "InputDataConfig"
            case jobName = "JobName"
            case outputDataConfig = "OutputDataConfig"
            case tags = "Tags"
            case volumeKmsKeyId = "VolumeKmsKeyId"
            case vpcConfig = "VpcConfig"
        }
    }

    public struct StartDominantLanguageDetectionJobResponse: AWSDecodableShape {
        /// The Amazon Resource Name (ARN) of the dominant language detection job. It is a unique, fully qualified identifier for the job. It includes the AWS account, Region, and the job ID. The format of the ARN is as follows:  arn::comprehend:::dominant-language-detection-job/  The following is an example job ARN:  arn:aws:comprehend:us-west-2:111122223333:dominant-language-detection-job/1234abcd12ab34cd56ef1234567890ab
        public let jobArn: String?
        /// The identifier generated for the job. To get the status of a job, use this identifier with the  operation.
        public let jobId: String?
        /// The status of the job.    SUBMITTED - The job has been received and is queued for processing.   IN_PROGRESS - Amazon Comprehend is processing the job.   COMPLETED - The job was successfully completed and the output is available.   FAILED - The job did not complete. To get details, use the  operation.
        public let jobStatus: JobStatus?

        public init(jobArn: String? = nil, jobId: String? = nil, jobStatus: JobStatus? = nil) {
            self.jobArn = jobArn
            self.jobId = jobId
            self.jobStatus = jobStatus
        }

        private enum CodingKeys: String, CodingKey {
            case jobArn = "JobArn"
            case jobId = "JobId"
            case jobStatus = "JobStatus"
        }
    }

    public struct StartEntitiesDetectionJobRequest: AWSEncodableShape {
        /// A unique identifier for the request. If you don't set the client request token, Amazon Comprehend generates one.
        public let clientRequestToken: String?
        /// The Amazon Resource Name (ARN) of the AWS Identity and Access Management (IAM) role that grants Amazon Comprehend read access to your input data. For more information, see https://docs.aws.amazon.com/comprehend/latest/dg/access-control-managing-permissions.html#auth-role-permissions.
        public let dataAccessRoleArn: String
        /// The Amazon Resource Name (ARN) that identifies the specific entity recognizer to be used by the StartEntitiesDetectionJob. This ARN is optional and is only used for a custom entity recognition job.
        public let entityRecognizerArn: String?
        /// Specifies the format and location of the input data for the job.
        public let inputDataConfig: InputDataConfig
        /// The identifier of the job.
        public let jobName: String?
        /// The language of the input documents. All documents must be in the same language. You can specify any of the languages supported by Amazon Comprehend. If custom entities recognition is used, this parameter is ignored and the language used for training the model is used instead.
        public let languageCode: LanguageCode
        /// Specifies where to send the output files.
        public let outputDataConfig: OutputDataConfig
        /// Tags to be associated with the entities detection job. A tag is a key-value pair that adds metadata to a resource used by Amazon Comprehend. For example, a tag with "Sales" as the key might be added to a resource to indicate its use by the sales department.
        public let tags: [Tag]?
        /// ID for the AWS Key Management Service (KMS) key that Amazon Comprehend uses to encrypt data on the storage volume attached to the ML compute instance(s) that process the analysis job. The VolumeKmsKeyId can be either of the following formats:   KMS Key ID: "1234abcd-12ab-34cd-56ef-1234567890ab"    Amazon Resource Name (ARN) of a KMS Key: "arn:aws:kms:us-west-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab"
        public let volumeKmsKeyId: String?
        /// Configuration parameters for an optional private Virtual Private Cloud (VPC) containing the resources you are using for your entity detection job. For more information, see Amazon VPC.
        public let vpcConfig: VpcConfig?

        public init(clientRequestToken: String? = StartEntitiesDetectionJobRequest.idempotencyToken(), dataAccessRoleArn: String, entityRecognizerArn: String? = nil, inputDataConfig: InputDataConfig, jobName: String? = nil, languageCode: LanguageCode, outputDataConfig: OutputDataConfig, tags: [Tag]? = nil, volumeKmsKeyId: String? = nil, vpcConfig: VpcConfig? = nil) {
            self.clientRequestToken = clientRequestToken
            self.dataAccessRoleArn = dataAccessRoleArn
            self.entityRecognizerArn = entityRecognizerArn
            self.inputDataConfig = inputDataConfig
            self.jobName = jobName
            self.languageCode = languageCode
            self.outputDataConfig = outputDataConfig
            self.tags = tags
            self.volumeKmsKeyId = volumeKmsKeyId
            self.vpcConfig = vpcConfig
        }

        public func validate(name: String) throws {
            try self.validate(self.clientRequestToken, name: "clientRequestToken", parent: name, max: 64)
            try self.validate(self.clientRequestToken, name: "clientRequestToken", parent: name, min: 1)
            try self.validate(self.clientRequestToken, name: "clientRequestToken", parent: name, pattern: "^[a-zA-Z0-9-]+$")
            try self.validate(self.dataAccessRoleArn, name: "dataAccessRoleArn", parent: name, max: 2048)
            try self.validate(self.dataAccessRoleArn, name: "dataAccessRoleArn", parent: name, min: 20)
            try self.validate(self.dataAccessRoleArn, name: "dataAccessRoleArn", parent: name, pattern: "^arn:aws(-[^:]+)?:iam::[0-9]{12}:role/.+$")
            try self.validate(self.entityRecognizerArn, name: "entityRecognizerArn", parent: name, max: 256)
            try self.validate(self.entityRecognizerArn, name: "entityRecognizerArn", parent: name, pattern: "^arn:aws(-[^:]+)?:comprehend:[a-zA-Z0-9-]*:[0-9]{12}:entity-recognizer/[a-zA-Z0-9](-*[a-zA-Z0-9])*(/version/[a-zA-Z0-9](-*[a-zA-Z0-9])*)?$")
            try self.inputDataConfig.validate(name: "\(name).inputDataConfig")
            try self.validate(self.jobName, name: "jobName", parent: name, max: 256)
            try self.validate(self.jobName, name: "jobName", parent: name, min: 1)
            try self.validate(self.jobName, name: "jobName", parent: name, pattern: "^([\\p{L}\\p{Z}\\p{N}_.:/=+\\-%@]*)$")
            try self.outputDataConfig.validate(name: "\(name).outputDataConfig")
            try self.tags?.forEach {
                try $0.validate(name: "\(name).tags[]")
            }
            try self.validate(self.volumeKmsKeyId, name: "volumeKmsKeyId", parent: name, max: 2048)
            try self.validate(self.volumeKmsKeyId, name: "volumeKmsKeyId", parent: name, pattern: "^\\p{ASCII}+$")
            try self.vpcConfig?.validate(name: "\(name).vpcConfig")
        }

        private enum CodingKeys: String, CodingKey {
            case clientRequestToken = "ClientRequestToken"
            case dataAccessRoleArn = "DataAccessRoleArn"
            case entityRecognizerArn = "EntityRecognizerArn"
            case inputDataConfig = "InputDataConfig"
            case jobName = "JobName"
            case languageCode = "LanguageCode"
            case outputDataConfig = "OutputDataConfig"
            case tags = "Tags"
            case volumeKmsKeyId = "VolumeKmsKeyId"
            case vpcConfig = "VpcConfig"
        }
    }

    public struct StartEntitiesDetectionJobResponse: AWSDecodableShape {
        /// The Amazon Resource Name (ARN) of the entities detection job. It is a unique, fully qualified identifier for the job. It includes the AWS account, Region, and the job ID. The format of the ARN is as follows:  arn::comprehend:::entities-detection-job/  The following is an example job ARN:  arn:aws:comprehend:us-west-2:111122223333:entities-detection-job/1234abcd12ab34cd56ef1234567890ab
        public let jobArn: String?
        /// The identifier generated for the job. To get the status of job, use this identifier with the  operation.
        public let jobId: String?
        /// The status of the job.    SUBMITTED - The job has been received and is queued for processing.   IN_PROGRESS - Amazon Comprehend is processing the job.   COMPLETED - The job was successfully completed and the output is available.   FAILED - The job did not complete. To get details, use the  operation.   STOP_REQUESTED - Amazon Comprehend has received a stop request for the job and is processing the request.   STOPPED - The job was successfully stopped without completing.
        public let jobStatus: JobStatus?

        public init(jobArn: String? = nil, jobId: String? = nil, jobStatus: JobStatus? = nil) {
            self.jobArn = jobArn
            self.jobId = jobId
            self.jobStatus = jobStatus
        }

        private enum CodingKeys: String, CodingKey {
            case jobArn = "JobArn"
            case jobId = "JobId"
            case jobStatus = "JobStatus"
        }
    }

    public struct StartEventsDetectionJobRequest: AWSEncodableShape {
        /// An unique identifier for the request. If you don't set the client request token, Amazon Comprehend generates one.
        public let clientRequestToken: String?
        /// The Amazon Resource Name (ARN) of the AWS Identity and Access Management (IAM) role that grants Amazon Comprehend read access to your input data.
        public let dataAccessRoleArn: String
        /// Specifies the format and location of the input data for the job.
        public let inputDataConfig: InputDataConfig
        /// The identifier of the events detection job.
        public let jobName: String?
        /// The language code of the input documents.
        public let languageCode: LanguageCode
        /// Specifies where to send the output files.
        public let outputDataConfig: OutputDataConfig
        /// Tags to be associated with the events detection job. A tag is a key-value pair that adds metadata to a resource used by Amazon Comprehend. For example, a tag with "Sales" as the key might be added to a resource to indicate its use by the sales department.
        public let tags: [Tag]?
        /// The types of events to detect in the input documents.
        public let targetEventTypes: [String]

        public init(clientRequestToken: String? = StartEventsDetectionJobRequest.idempotencyToken(), dataAccessRoleArn: String, inputDataConfig: InputDataConfig, jobName: String? = nil, languageCode: LanguageCode, outputDataConfig: OutputDataConfig, tags: [Tag]? = nil, targetEventTypes: [String]) {
            self.clientRequestToken = clientRequestToken
            self.dataAccessRoleArn = dataAccessRoleArn
            self.inputDataConfig = inputDataConfig
            self.jobName = jobName
            self.languageCode = languageCode
            self.outputDataConfig = outputDataConfig
            self.tags = tags
            self.targetEventTypes = targetEventTypes
        }

        public func validate(name: String) throws {
            try self.validate(self.clientRequestToken, name: "clientRequestToken", parent: name, max: 64)
            try self.validate(self.clientRequestToken, name: "clientRequestToken", parent: name, min: 1)
            try self.validate(self.clientRequestToken, name: "clientRequestToken", parent: name, pattern: "^[a-zA-Z0-9-]+$")
            try self.validate(self.dataAccessRoleArn, name: "dataAccessRoleArn", parent: name, max: 2048)
            try self.validate(self.dataAccessRoleArn, name: "dataAccessRoleArn", parent: name, min: 20)
            try self.validate(self.dataAccessRoleArn, name: "dataAccessRoleArn", parent: name, pattern: "^arn:aws(-[^:]+)?:iam::[0-9]{12}:role/.+$")
            try self.inputDataConfig.validate(name: "\(name).inputDataConfig")
            try self.validate(self.jobName, name: "jobName", parent: name, max: 256)
            try self.validate(self.jobName, name: "jobName", parent: name, min: 1)
            try self.validate(self.jobName, name: "jobName", parent: name, pattern: "^([\\p{L}\\p{Z}\\p{N}_.:/=+\\-%@]*)$")
            try self.outputDataConfig.validate(name: "\(name).outputDataConfig")
            try self.tags?.forEach {
                try $0.validate(name: "\(name).tags[]")
            }
            try self.targetEventTypes.forEach {
                try validate($0, name: "targetEventTypes[]", parent: name, max: 40)
                try validate($0, name: "targetEventTypes[]", parent: name, min: 1)
                try validate($0, name: "targetEventTypes[]", parent: name, pattern: "^[A-Z_]*$")
            }
            try self.validate(self.targetEventTypes, name: "targetEventTypes", parent: name, min: 1)
        }

        private enum CodingKeys: String, CodingKey {
            case clientRequestToken = "ClientRequestToken"
            case dataAccessRoleArn = "DataAccessRoleArn"
            case inputDataConfig = "InputDataConfig"
            case jobName = "JobName"
            case languageCode = "LanguageCode"
            case outputDataConfig = "OutputDataConfig"
            case tags = "Tags"
            case targetEventTypes = "TargetEventTypes"
        }
    }

    public struct StartEventsDetectionJobResponse: AWSDecodableShape {
        /// The Amazon Resource Name (ARN) of the events detection job. It is a unique, fully qualified identifier for the job. It includes the AWS account, Region, and the job ID. The format of the ARN is as follows:  arn::comprehend:::events-detection-job/  The following is an example job ARN:  arn:aws:comprehend:us-west-2:111122223333:events-detection-job/1234abcd12ab34cd56ef1234567890ab
        public let jobArn: String?
        /// An unique identifier for the request. If you don't set the client request token, Amazon Comprehend generates one.
        public let jobId: String?
        /// The status of the events detection job.
        public let jobStatus: JobStatus?

        public init(jobArn: String? = nil, jobId: String? = nil, jobStatus: JobStatus? = nil) {
            self.jobArn = jobArn
            self.jobId = jobId
            self.jobStatus = jobStatus
        }

        private enum CodingKeys: String, CodingKey {
            case jobArn = "JobArn"
            case jobId = "JobId"
            case jobStatus = "JobStatus"
        }
    }

    public struct StartKeyPhrasesDetectionJobRequest: AWSEncodableShape {
        /// A unique identifier for the request. If you don't set the client request token, Amazon Comprehend generates one.
        public let clientRequestToken: String?
        /// The Amazon Resource Name (ARN) of the AWS Identity and Access Management (IAM) role that grants Amazon Comprehend read access to your input data. For more information, see https://docs.aws.amazon.com/comprehend/latest/dg/access-control-managing-permissions.html#auth-role-permissions.
        public let dataAccessRoleArn: String
        /// Specifies the format and location of the input data for the job.
        public let inputDataConfig: InputDataConfig
        /// The identifier of the job.
        public let jobName: String?
        /// The language of the input documents. You can specify any of the primary languages supported by Amazon Comprehend. All documents must be in the same language.
        public let languageCode: LanguageCode
        /// Specifies where to send the output files.
        public let outputDataConfig: OutputDataConfig
        /// Tags to be associated with the key phrases detection job. A tag is a key-value pair that adds metadata to a resource used by Amazon Comprehend. For example, a tag with "Sales" as the key might be added to a resource to indicate its use by the sales department.
        public let tags: [Tag]?
        /// ID for the AWS Key Management Service (KMS) key that Amazon Comprehend uses to encrypt data on the storage volume attached to the ML compute instance(s) that process the analysis job. The VolumeKmsKeyId can be either of the following formats:   KMS Key ID: "1234abcd-12ab-34cd-56ef-1234567890ab"    Amazon Resource Name (ARN) of a KMS Key: "arn:aws:kms:us-west-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab"
        public let volumeKmsKeyId: String?
        ///  Configuration parameters for an optional private Virtual Private Cloud (VPC) containing the resources you are using for your key phrases detection job. For more information, see Amazon VPC.
        public let vpcConfig: VpcConfig?

        public init(clientRequestToken: String? = StartKeyPhrasesDetectionJobRequest.idempotencyToken(), dataAccessRoleArn: String, inputDataConfig: InputDataConfig, jobName: String? = nil, languageCode: LanguageCode, outputDataConfig: OutputDataConfig, tags: [Tag]? = nil, volumeKmsKeyId: String? = nil, vpcConfig: VpcConfig? = nil) {
            self.clientRequestToken = clientRequestToken
            self.dataAccessRoleArn = dataAccessRoleArn
            self.inputDataConfig = inputDataConfig
            self.jobName = jobName
            self.languageCode = languageCode
            self.outputDataConfig = outputDataConfig
            self.tags = tags
            self.volumeKmsKeyId = volumeKmsKeyId
            self.vpcConfig = vpcConfig
        }

        public func validate(name: String) throws {
            try self.validate(self.clientRequestToken, name: "clientRequestToken", parent: name, max: 64)
            try self.validate(self.clientRequestToken, name: "clientRequestToken", parent: name, min: 1)
            try self.validate(self.clientRequestToken, name: "clientRequestToken", parent: name, pattern: "^[a-zA-Z0-9-]+$")
            try self.validate(self.dataAccessRoleArn, name: "dataAccessRoleArn", parent: name, max: 2048)
            try self.validate(self.dataAccessRoleArn, name: "dataAccessRoleArn", parent: name, min: 20)
            try self.validate(self.dataAccessRoleArn, name: "dataAccessRoleArn", parent: name, pattern: "^arn:aws(-[^:]+)?:iam::[0-9]{12}:role/.+$")
            try self.inputDataConfig.validate(name: "\(name).inputDataConfig")
            try self.validate(self.jobName, name: "jobName", parent: name, max: 256)
            try self.validate(self.jobName, name: "jobName", parent: name, min: 1)
            try self.validate(self.jobName, name: "jobName", parent: name, pattern: "^([\\p{L}\\p{Z}\\p{N}_.:/=+\\-%@]*)$")
            try self.outputDataConfig.validate(name: "\(name).outputDataConfig")
            try self.tags?.forEach {
                try $0.validate(name: "\(name).tags[]")
            }
            try self.validate(self.volumeKmsKeyId, name: "volumeKmsKeyId", parent: name, max: 2048)
            try self.validate(self.volumeKmsKeyId, name: "volumeKmsKeyId", parent: name, pattern: "^\\p{ASCII}+$")
            try self.vpcConfig?.validate(name: "\(name).vpcConfig")
        }

        private enum CodingKeys: String, CodingKey {
            case clientRequestToken = "ClientRequestToken"
            case dataAccessRoleArn = "DataAccessRoleArn"
            case inputDataConfig = "InputDataConfig"
            case jobName = "JobName"
            case languageCode = "LanguageCode"
            case outputDataConfig = "OutputDataConfig"
            case tags = "Tags"
            case volumeKmsKeyId = "VolumeKmsKeyId"
            case vpcConfig = "VpcConfig"
        }
    }

    public struct StartKeyPhrasesDetectionJobResponse: AWSDecodableShape {
        /// The Amazon Resource Name (ARN) of the key phrase detection job. It is a unique, fully qualified identifier for the job. It includes the AWS account, Region, and the job ID. The format of the ARN is as follows:  arn::comprehend:::key-phrases-detection-job/  The following is an example job ARN:  arn:aws:comprehend:us-west-2:111122223333:key-phrases-detection-job/1234abcd12ab34cd56ef1234567890ab
        public let jobArn: String?
        /// The identifier generated for the job. To get the status of a job, use this identifier with the  operation.
        public let jobId: String?
        /// The status of the job.    SUBMITTED - The job has been received and is queued for processing.   IN_PROGRESS - Amazon Comprehend is processing the job.   COMPLETED - The job was successfully completed and the output is available.   FAILED - The job did not complete. To get details, use the  operation.
        public let jobStatus: JobStatus?

        public init(jobArn: String? = nil, jobId: String? = nil, jobStatus: JobStatus? = nil) {
            self.jobArn = jobArn
            self.jobId = jobId
            self.jobStatus = jobStatus
        }

        private enum CodingKeys: String, CodingKey {
            case jobArn = "JobArn"
            case jobId = "JobId"
            case jobStatus = "JobStatus"
        }
    }

    public struct StartPiiEntitiesDetectionJobRequest: AWSEncodableShape {
        /// A unique identifier for the request. If you don't set the client request token, Amazon Comprehend generates one.
        public let clientRequestToken: String?
        /// The Amazon Resource Name (ARN) of the AWS Identity and Access Management (IAM) role that grants Amazon Comprehend read access to your input data.
        public let dataAccessRoleArn: String
        /// The input properties for a PII entities detection job.
        public let inputDataConfig: InputDataConfig
        /// The identifier of the job.
        public let jobName: String?
        /// The language of the input documents. Currently, English is the only valid language.
        public let languageCode: LanguageCode
        /// Specifies whether the output provides the locations (offsets) of PII entities or a file in which PII entities are redacted.
        public let mode: PiiEntitiesDetectionMode
        /// Provides conﬁguration parameters for the output of PII entity detection jobs.
        public let outputDataConfig: OutputDataConfig
        /// Provides configuration parameters for PII entity redaction. This parameter is required if you set the Mode parameter to ONLY_REDACTION. In that case, you must provide a RedactionConfig definition that includes the PiiEntityTypes parameter.
        public let redactionConfig: RedactionConfig?
        /// Tags to be associated with the PII entities detection job. A tag is a key-value pair that adds metadata to a resource used by Amazon Comprehend. For example, a tag with "Sales" as the key might be added to a resource to indicate its use by the sales department.
        public let tags: [Tag]?

        public init(clientRequestToken: String? = StartPiiEntitiesDetectionJobRequest.idempotencyToken(), dataAccessRoleArn: String, inputDataConfig: InputDataConfig, jobName: String? = nil, languageCode: LanguageCode, mode: PiiEntitiesDetectionMode, outputDataConfig: OutputDataConfig, redactionConfig: RedactionConfig? = nil, tags: [Tag]? = nil) {
            self.clientRequestToken = clientRequestToken
            self.dataAccessRoleArn = dataAccessRoleArn
            self.inputDataConfig = inputDataConfig
            self.jobName = jobName
            self.languageCode = languageCode
            self.mode = mode
            self.outputDataConfig = outputDataConfig
            self.redactionConfig = redactionConfig
            self.tags = tags
        }

        public func validate(name: String) throws {
            try self.validate(self.clientRequestToken, name: "clientRequestToken", parent: name, max: 64)
            try self.validate(self.clientRequestToken, name: "clientRequestToken", parent: name, min: 1)
            try self.validate(self.clientRequestToken, name: "clientRequestToken", parent: name, pattern: "^[a-zA-Z0-9-]+$")
            try self.validate(self.dataAccessRoleArn, name: "dataAccessRoleArn", parent: name, max: 2048)
            try self.validate(self.dataAccessRoleArn, name: "dataAccessRoleArn", parent: name, min: 20)
            try self.validate(self.dataAccessRoleArn, name: "dataAccessRoleArn", parent: name, pattern: "^arn:aws(-[^:]+)?:iam::[0-9]{12}:role/.+$")
            try self.inputDataConfig.validate(name: "\(name).inputDataConfig")
            try self.validate(self.jobName, name: "jobName", parent: name, max: 256)
            try self.validate(self.jobName, name: "jobName", parent: name, min: 1)
            try self.validate(self.jobName, name: "jobName", parent: name, pattern: "^([\\p{L}\\p{Z}\\p{N}_.:/=+\\-%@]*)$")
            try self.outputDataConfig.validate(name: "\(name).outputDataConfig")
            try self.redactionConfig?.validate(name: "\(name).redactionConfig")
            try self.tags?.forEach {
                try $0.validate(name: "\(name).tags[]")
            }
        }

        private enum CodingKeys: String, CodingKey {
            case clientRequestToken = "ClientRequestToken"
            case dataAccessRoleArn = "DataAccessRoleArn"
            case inputDataConfig = "InputDataConfig"
            case jobName = "JobName"
            case languageCode = "LanguageCode"
            case mode = "Mode"
            case outputDataConfig = "OutputDataConfig"
            case redactionConfig = "RedactionConfig"
            case tags = "Tags"
        }
    }

    public struct StartPiiEntitiesDetectionJobResponse: AWSDecodableShape {
        /// The Amazon Resource Name (ARN) of the PII entity detection job. It is a unique, fully qualified identifier for the job. It includes the AWS account, Region, and the job ID. The format of the ARN is as follows:  arn::comprehend:::pii-entities-detection-job/  The following is an example job ARN:  arn:aws:comprehend:us-west-2:111122223333:pii-entities-detection-job/1234abcd12ab34cd56ef1234567890ab
        public let jobArn: String?
        /// The identifier generated for the job.
        public let jobId: String?
        /// The status of the job.
        public let jobStatus: JobStatus?

        public init(jobArn: String? = nil, jobId: String? = nil, jobStatus: JobStatus? = nil) {
            self.jobArn = jobArn
            self.jobId = jobId
            self.jobStatus = jobStatus
        }

        private enum CodingKeys: String, CodingKey {
            case jobArn = "JobArn"
            case jobId = "JobId"
            case jobStatus = "JobStatus"
        }
    }

    public struct StartSentimentDetectionJobRequest: AWSEncodableShape {
        /// A unique identifier for the request. If you don't set the client request token, Amazon Comprehend generates one.
        public let clientRequestToken: String?
        /// The Amazon Resource Name (ARN) of the AWS Identity and Access Management (IAM) role that grants Amazon Comprehend read access to your input data. For more information, see https://docs.aws.amazon.com/comprehend/latest/dg/access-control-managing-permissions.html#auth-role-permissions.
        public let dataAccessRoleArn: String
        /// Specifies the format and location of the input data for the job.
        public let inputDataConfig: InputDataConfig
        /// The identifier of the job.
        public let jobName: String?
        /// The language of the input documents. You can specify any of the primary languages supported by Amazon Comprehend. All documents must be in the same language.
        public let languageCode: LanguageCode
        /// Specifies where to send the output files.
        public let outputDataConfig: OutputDataConfig
        /// Tags to be associated with the sentiment detection job. A tag is a key-value pair that adds metadata to a resource used by Amazon Comprehend. For example, a tag with "Sales" as the key might be added to a resource to indicate its use by the sales department.
        public let tags: [Tag]?
        /// ID for the AWS Key Management Service (KMS) key that Amazon Comprehend uses to encrypt data on the storage volume attached to the ML compute instance(s) that process the analysis job. The VolumeKmsKeyId can be either of the following formats:   KMS Key ID: "1234abcd-12ab-34cd-56ef-1234567890ab"    Amazon Resource Name (ARN) of a KMS Key: "arn:aws:kms:us-west-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab"
        public let volumeKmsKeyId: String?
        /// Configuration parameters for an optional private Virtual Private Cloud (VPC) containing the resources you are using for your sentiment detection job. For more information, see Amazon VPC.
        public let vpcConfig: VpcConfig?

        public init(clientRequestToken: String? = StartSentimentDetectionJobRequest.idempotencyToken(), dataAccessRoleArn: String, inputDataConfig: InputDataConfig, jobName: String? = nil, languageCode: LanguageCode, outputDataConfig: OutputDataConfig, tags: [Tag]? = nil, volumeKmsKeyId: String? = nil, vpcConfig: VpcConfig? = nil) {
            self.clientRequestToken = clientRequestToken
            self.dataAccessRoleArn = dataAccessRoleArn
            self.inputDataConfig = inputDataConfig
            self.jobName = jobName
            self.languageCode = languageCode
            self.outputDataConfig = outputDataConfig
            self.tags = tags
            self.volumeKmsKeyId = volumeKmsKeyId
            self.vpcConfig = vpcConfig
        }

        public func validate(name: String) throws {
            try self.validate(self.clientRequestToken, name: "clientRequestToken", parent: name, max: 64)
            try self.validate(self.clientRequestToken, name: "clientRequestToken", parent: name, min: 1)
            try self.validate(self.clientRequestToken, name: "clientRequestToken", parent: name, pattern: "^[a-zA-Z0-9-]+$")
            try self.validate(self.dataAccessRoleArn, name: "dataAccessRoleArn", parent: name, max: 2048)
            try self.validate(self.dataAccessRoleArn, name: "dataAccessRoleArn", parent: name, min: 20)
            try self.validate(self.dataAccessRoleArn, name: "dataAccessRoleArn", parent: name, pattern: "^arn:aws(-[^:]+)?:iam::[0-9]{12}:role/.+$")
            try self.inputDataConfig.validate(name: "\(name).inputDataConfig")
            try self.validate(self.jobName, name: "jobName", parent: name, max: 256)
            try self.validate(self.jobName, name: "jobName", parent: name, min: 1)
            try self.validate(self.jobName, name: "jobName", parent: name, pattern: "^([\\p{L}\\p{Z}\\p{N}_.:/=+\\-%@]*)$")
            try self.outputDataConfig.validate(name: "\(name).outputDataConfig")
            try self.tags?.forEach {
                try $0.validate(name: "\(name).tags[]")
            }
            try self.validate(self.volumeKmsKeyId, name: "volumeKmsKeyId", parent: name, max: 2048)
            try self.validate(self.volumeKmsKeyId, name: "volumeKmsKeyId", parent: name, pattern: "^\\p{ASCII}+$")
            try self.vpcConfig?.validate(name: "\(name).vpcConfig")
        }

        private enum CodingKeys: String, CodingKey {
            case clientRequestToken = "ClientRequestToken"
            case dataAccessRoleArn = "DataAccessRoleArn"
            case inputDataConfig = "InputDataConfig"
            case jobName = "JobName"
            case languageCode = "LanguageCode"
            case outputDataConfig = "OutputDataConfig"
            case tags = "Tags"
            case volumeKmsKeyId = "VolumeKmsKeyId"
            case vpcConfig = "VpcConfig"
        }
    }

    public struct StartSentimentDetectionJobResponse: AWSDecodableShape {
        /// The Amazon Resource Name (ARN) of the sentiment detection job. It is a unique, fully qualified identifier for the job. It includes the AWS account, Region, and the job ID. The format of the ARN is as follows:  arn::comprehend:::sentiment-detection-job/  The following is an example job ARN:  arn:aws:comprehend:us-west-2:111122223333:sentiment-detection-job/1234abcd12ab34cd56ef1234567890ab
        public let jobArn: String?
        /// The identifier generated for the job. To get the status of a job, use this identifier with the  operation.
        public let jobId: String?
        /// The status of the job.    SUBMITTED - The job has been received and is queued for processing.   IN_PROGRESS - Amazon Comprehend is processing the job.   COMPLETED - The job was successfully completed and the output is available.   FAILED - The job did not complete. To get details, use the  operation.
        public let jobStatus: JobStatus?

        public init(jobArn: String? = nil, jobId: String? = nil, jobStatus: JobStatus? = nil) {
            self.jobArn = jobArn
            self.jobId = jobId
            self.jobStatus = jobStatus
        }

        private enum CodingKeys: String, CodingKey {
            case jobArn = "JobArn"
            case jobId = "JobId"
            case jobStatus = "JobStatus"
        }
    }

    public struct StartTargetedSentimentDetectionJobRequest: AWSEncodableShape {
        /// A unique identifier for the request. If you don't set the client request token, Amazon Comprehend generates one.
        public let clientRequestToken: String?
        /// The Amazon Resource Name (ARN) of the AWS Identity and Access Management (IAM) role that grants Amazon Comprehend read access to your input data. For more information, see Role-based permissions.
        public let dataAccessRoleArn: String
        public let inputDataConfig: InputDataConfig
        /// The identifier of the job.
        public let jobName: String?
        /// The language of the input documents. Currently, English is the only supported language.
        public let languageCode: LanguageCode
        /// Specifies where to send the output files.
        public let outputDataConfig: OutputDataConfig
        /// Tags to be associated with the targeted sentiment detection job. A tag is a key-value pair that adds metadata to a resource used by Amazon Comprehend. For example, a tag with "Sales" as the key might be added to a resource to indicate its use by the sales department.
        public let tags: [Tag]?
        /// ID for the KMS key that Amazon Comprehend uses to encrypt data on the storage volume attached to the ML compute instance(s) that process the analysis job. The VolumeKmsKeyId can be either of the following formats:   KMS Key ID: "1234abcd-12ab-34cd-56ef-1234567890ab"    Amazon Resource Name (ARN) of a KMS Key: "arn:aws:kms:us-west-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab"
        public let volumeKmsKeyId: String?
        public let vpcConfig: VpcConfig?

        public init(clientRequestToken: String? = StartTargetedSentimentDetectionJobRequest.idempotencyToken(), dataAccessRoleArn: String, inputDataConfig: InputDataConfig, jobName: String? = nil, languageCode: LanguageCode, outputDataConfig: OutputDataConfig, tags: [Tag]? = nil, volumeKmsKeyId: String? = nil, vpcConfig: VpcConfig? = nil) {
            self.clientRequestToken = clientRequestToken
            self.dataAccessRoleArn = dataAccessRoleArn
            self.inputDataConfig = inputDataConfig
            self.jobName = jobName
            self.languageCode = languageCode
            self.outputDataConfig = outputDataConfig
            self.tags = tags
            self.volumeKmsKeyId = volumeKmsKeyId
            self.vpcConfig = vpcConfig
        }

        public func validate(name: String) throws {
            try self.validate(self.clientRequestToken, name: "clientRequestToken", parent: name, max: 64)
            try self.validate(self.clientRequestToken, name: "clientRequestToken", parent: name, min: 1)
            try self.validate(self.clientRequestToken, name: "clientRequestToken", parent: name, pattern: "^[a-zA-Z0-9-]+$")
            try self.validate(self.dataAccessRoleArn, name: "dataAccessRoleArn", parent: name, max: 2048)
            try self.validate(self.dataAccessRoleArn, name: "dataAccessRoleArn", parent: name, min: 20)
            try self.validate(self.dataAccessRoleArn, name: "dataAccessRoleArn", parent: name, pattern: "^arn:aws(-[^:]+)?:iam::[0-9]{12}:role/.+$")
            try self.inputDataConfig.validate(name: "\(name).inputDataConfig")
            try self.validate(self.jobName, name: "jobName", parent: name, max: 256)
            try self.validate(self.jobName, name: "jobName", parent: name, min: 1)
            try self.validate(self.jobName, name: "jobName", parent: name, pattern: "^([\\p{L}\\p{Z}\\p{N}_.:/=+\\-%@]*)$")
            try self.outputDataConfig.validate(name: "\(name).outputDataConfig")
            try self.tags?.forEach {
                try $0.validate(name: "\(name).tags[]")
            }
            try self.validate(self.volumeKmsKeyId, name: "volumeKmsKeyId", parent: name, max: 2048)
            try self.validate(self.volumeKmsKeyId, name: "volumeKmsKeyId", parent: name, pattern: "^\\p{ASCII}+$")
            try self.vpcConfig?.validate(name: "\(name).vpcConfig")
        }

        private enum CodingKeys: String, CodingKey {
            case clientRequestToken = "ClientRequestToken"
            case dataAccessRoleArn = "DataAccessRoleArn"
            case inputDataConfig = "InputDataConfig"
            case jobName = "JobName"
            case languageCode = "LanguageCode"
            case outputDataConfig = "OutputDataConfig"
            case tags = "Tags"
            case volumeKmsKeyId = "VolumeKmsKeyId"
            case vpcConfig = "VpcConfig"
        }
    }

    public struct StartTargetedSentimentDetectionJobResponse: AWSDecodableShape {
        /// The Amazon Resource Name (ARN) of the targeted sentiment detection job. It is a unique, fully qualified identifier for the job. It includes the AWS account, Region, and the job ID. The format of the ARN is as follows:  arn::comprehend:::targeted-sentiment-detection-job/  The following is an example job ARN:  arn:aws:comprehend:us-west-2:111122223333:targeted-sentiment-detection-job/1234abcd12ab34cd56ef1234567890ab
        public let jobArn: String?
        /// The identifier generated for the job. To get the status of a job, use this identifier with the  operation.
        public let jobId: String?
        /// The status of the job.    SUBMITTED - The job has been received and is queued for processing.   IN_PROGRESS - Amazon Comprehend is processing the job.   COMPLETED - The job was successfully completed and the output is available.   FAILED - The job did not complete. To get details, use the  operation.
        public let jobStatus: JobStatus?

        public init(jobArn: String? = nil, jobId: String? = nil, jobStatus: JobStatus? = nil) {
            self.jobArn = jobArn
            self.jobId = jobId
            self.jobStatus = jobStatus
        }

        private enum CodingKeys: String, CodingKey {
            case jobArn = "JobArn"
            case jobId = "JobId"
            case jobStatus = "JobStatus"
        }
    }

    public struct StartTopicsDetectionJobRequest: AWSEncodableShape {
        /// A unique identifier for the request. If you do not set the client request token, Amazon Comprehend generates one.
        public let clientRequestToken: String?
        /// The Amazon Resource Name (ARN) of the AWS Identity and Access Management (IAM) role that grants Amazon Comprehend read access to your input data. For more information, see https://docs.aws.amazon.com/comprehend/latest/dg/access-control-managing-permissions.html#auth-role-permissions.
        public let dataAccessRoleArn: String
        /// Specifies the format and location of the input data for the job.
        public let inputDataConfig: InputDataConfig
        /// The identifier of the job.
        public let jobName: String?
        /// The number of topics to detect.
        public let numberOfTopics: Int?
        /// Specifies where to send the output files. The output is a compressed archive with two files, topic-terms.csv that lists the terms associated with each topic, and doc-topics.csv that lists the documents associated with each topic
        public let outputDataConfig: OutputDataConfig
        /// Tags to be associated with the topics detection job. A tag is a key-value pair that adds metadata to a resource used by Amazon Comprehend. For example, a tag with "Sales" as the key might be added to a resource to indicate its use by the sales department.
        public let tags: [Tag]?
        /// ID for the AWS Key Management Service (KMS) key that Amazon Comprehend uses to encrypt data on the storage volume attached to the ML compute instance(s) that process the analysis job. The VolumeKmsKeyId can be either of the following formats:   KMS Key ID: "1234abcd-12ab-34cd-56ef-1234567890ab"    Amazon Resource Name (ARN) of a KMS Key: "arn:aws:kms:us-west-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab"
        public let volumeKmsKeyId: String?
        /// Configuration parameters for an optional private Virtual Private Cloud (VPC) containing the resources you are using for your topic detection job. For more information, see Amazon VPC.
        public let vpcConfig: VpcConfig?

        public init(clientRequestToken: String? = StartTopicsDetectionJobRequest.idempotencyToken(), dataAccessRoleArn: String, inputDataConfig: InputDataConfig, jobName: String? = nil, numberOfTopics: Int? = nil, outputDataConfig: OutputDataConfig, tags: [Tag]? = nil, volumeKmsKeyId: String? = nil, vpcConfig: VpcConfig? = nil) {
            self.clientRequestToken = clientRequestToken
            self.dataAccessRoleArn = dataAccessRoleArn
            self.inputDataConfig = inputDataConfig
            self.jobName = jobName
            self.numberOfTopics = numberOfTopics
            self.outputDataConfig = outputDataConfig
            self.tags = tags
            self.volumeKmsKeyId = volumeKmsKeyId
            self.vpcConfig = vpcConfig
        }

        public func validate(name: String) throws {
            try self.validate(self.clientRequestToken, name: "clientRequestToken", parent: name, max: 64)
            try self.validate(self.clientRequestToken, name: "clientRequestToken", parent: name, min: 1)
            try self.validate(self.clientRequestToken, name: "clientRequestToken", parent: name, pattern: "^[a-zA-Z0-9-]+$")
            try self.validate(self.dataAccessRoleArn, name: "dataAccessRoleArn", parent: name, max: 2048)
            try self.validate(self.dataAccessRoleArn, name: "dataAccessRoleArn", parent: name, min: 20)
            try self.validate(self.dataAccessRoleArn, name: "dataAccessRoleArn", parent: name, pattern: "^arn:aws(-[^:]+)?:iam::[0-9]{12}:role/.+$")
            try self.inputDataConfig.validate(name: "\(name).inputDataConfig")
            try self.validate(self.jobName, name: "jobName", parent: name, max: 256)
            try self.validate(self.jobName, name: "jobName", parent: name, min: 1)
            try self.validate(self.jobName, name: "jobName", parent: name, pattern: "^([\\p{L}\\p{Z}\\p{N}_.:/=+\\-%@]*)$")
            try self.validate(self.numberOfTopics, name: "numberOfTopics", parent: name, max: 100)
            try self.validate(self.numberOfTopics, name: "numberOfTopics", parent: name, min: 1)
            try self.outputDataConfig.validate(name: "\(name).outputDataConfig")
            try self.tags?.forEach {
                try $0.validate(name: "\(name).tags[]")
            }
            try self.validate(self.volumeKmsKeyId, name: "volumeKmsKeyId", parent: name, max: 2048)
            try self.validate(self.volumeKmsKeyId, name: "volumeKmsKeyId", parent: name, pattern: "^\\p{ASCII}+$")
            try self.vpcConfig?.validate(name: "\(name).vpcConfig")
        }

        private enum CodingKeys: String, CodingKey {
            case clientRequestToken = "ClientRequestToken"
            case dataAccessRoleArn = "DataAccessRoleArn"
            case inputDataConfig = "InputDataConfig"
            case jobName = "JobName"
            case numberOfTopics = "NumberOfTopics"
            case outputDataConfig = "OutputDataConfig"
            case tags = "Tags"
            case volumeKmsKeyId = "VolumeKmsKeyId"
            case vpcConfig = "VpcConfig"
        }
    }

    public struct StartTopicsDetectionJobResponse: AWSDecodableShape {
        /// The Amazon Resource Name (ARN) of the topics detection job. It is a unique, fully qualified identifier for the job. It includes the AWS account, Region, and the job ID. The format of the ARN is as follows:  arn::comprehend:::topics-detection-job/  The following is an example job ARN:  arn:aws:comprehend:us-west-2:111122223333:document-classification-job/1234abcd12ab34cd56ef1234567890ab
        public let jobArn: String?
        /// The identifier generated for the job. To get the status of the job, use this identifier with the DescribeTopicDetectionJob operation.
        public let jobId: String?
        /// The status of the job:    SUBMITTED - The job has been received and is queued for processing.   IN_PROGRESS - Amazon Comprehend is processing the job.   COMPLETED - The job was successfully completed and the output is available.   FAILED - The job did not complete. To get details, use the DescribeTopicDetectionJob operation.
        public let jobStatus: JobStatus?

        public init(jobArn: String? = nil, jobId: String? = nil, jobStatus: JobStatus? = nil) {
            self.jobArn = jobArn
            self.jobId = jobId
            self.jobStatus = jobStatus
        }

        private enum CodingKeys: String, CodingKey {
            case jobArn = "JobArn"
            case jobId = "JobId"
            case jobStatus = "JobStatus"
        }
    }

    public struct StopDominantLanguageDetectionJobRequest: AWSEncodableShape {
        /// The identifier of the dominant language detection job to stop.
        public let jobId: String

        public init(jobId: String) {
            self.jobId = jobId
        }

        public func validate(name: String) throws {
            try self.validate(self.jobId, name: "jobId", parent: name, max: 32)
            try self.validate(self.jobId, name: "jobId", parent: name, min: 1)
            try self.validate(self.jobId, name: "jobId", parent: name, pattern: "^([\\p{L}\\p{Z}\\p{N}_.:/=+\\-%@]*)$")
        }

        private enum CodingKeys: String, CodingKey {
            case jobId = "JobId"
        }
    }

    public struct StopDominantLanguageDetectionJobResponse: AWSDecodableShape {
        /// The identifier of the dominant language detection job to stop.
        public let jobId: String?
        /// Either STOP_REQUESTED if the job is currently running, or STOPPED if the job was previously stopped with the StopDominantLanguageDetectionJob operation.
        public let jobStatus: JobStatus?

        public init(jobId: String? = nil, jobStatus: JobStatus? = nil) {
            self.jobId = jobId
            self.jobStatus = jobStatus
        }

        private enum CodingKeys: String, CodingKey {
            case jobId = "JobId"
            case jobStatus = "JobStatus"
        }
    }

    public struct StopEntitiesDetectionJobRequest: AWSEncodableShape {
        /// The identifier of the entities detection job to stop.
        public let jobId: String

        public init(jobId: String) {
            self.jobId = jobId
        }

        public func validate(name: String) throws {
            try self.validate(self.jobId, name: "jobId", parent: name, max: 32)
            try self.validate(self.jobId, name: "jobId", parent: name, min: 1)
            try self.validate(self.jobId, name: "jobId", parent: name, pattern: "^([\\p{L}\\p{Z}\\p{N}_.:/=+\\-%@]*)$")
        }

        private enum CodingKeys: String, CodingKey {
            case jobId = "JobId"
        }
    }

    public struct StopEntitiesDetectionJobResponse: AWSDecodableShape {
        /// The identifier of the entities detection job to stop.
        public let jobId: String?
        /// Either STOP_REQUESTED if the job is currently running, or STOPPED if the job was previously stopped with the StopEntitiesDetectionJob operation.
        public let jobStatus: JobStatus?

        public init(jobId: String? = nil, jobStatus: JobStatus? = nil) {
            self.jobId = jobId
            self.jobStatus = jobStatus
        }

        private enum CodingKeys: String, CodingKey {
            case jobId = "JobId"
            case jobStatus = "JobStatus"
        }
    }

    public struct StopEventsDetectionJobRequest: AWSEncodableShape {
        /// The identifier of the events detection job to stop.
        public let jobId: String

        public init(jobId: String) {
            self.jobId = jobId
        }

        public func validate(name: String) throws {
            try self.validate(self.jobId, name: "jobId", parent: name, max: 32)
            try self.validate(self.jobId, name: "jobId", parent: name, min: 1)
            try self.validate(self.jobId, name: "jobId", parent: name, pattern: "^([\\p{L}\\p{Z}\\p{N}_.:/=+\\-%@]*)$")
        }

        private enum CodingKeys: String, CodingKey {
            case jobId = "JobId"
        }
    }

    public struct StopEventsDetectionJobResponse: AWSDecodableShape {
        /// The identifier of the events detection job to stop.
        public let jobId: String?
        /// The status of the events detection job.
        public let jobStatus: JobStatus?

        public init(jobId: String? = nil, jobStatus: JobStatus? = nil) {
            self.jobId = jobId
            self.jobStatus = jobStatus
        }

        private enum CodingKeys: String, CodingKey {
            case jobId = "JobId"
            case jobStatus = "JobStatus"
        }
    }

    public struct StopKeyPhrasesDetectionJobRequest: AWSEncodableShape {
        /// The identifier of the key phrases detection job to stop.
        public let jobId: String

        public init(jobId: String) {
            self.jobId = jobId
        }

        public func validate(name: String) throws {
            try self.validate(self.jobId, name: "jobId", parent: name, max: 32)
            try self.validate(self.jobId, name: "jobId", parent: name, min: 1)
            try self.validate(self.jobId, name: "jobId", parent: name, pattern: "^([\\p{L}\\p{Z}\\p{N}_.:/=+\\-%@]*)$")
        }

        private enum CodingKeys: String, CodingKey {
            case jobId = "JobId"
        }
    }

    public struct StopKeyPhrasesDetectionJobResponse: AWSDecodableShape {
        /// The identifier of the key phrases detection job to stop.
        public let jobId: String?
        /// Either STOP_REQUESTED if the job is currently running, or STOPPED if the job was previously stopped with the StopKeyPhrasesDetectionJob operation.
        public let jobStatus: JobStatus?

        public init(jobId: String? = nil, jobStatus: JobStatus? = nil) {
            self.jobId = jobId
            self.jobStatus = jobStatus
        }

        private enum CodingKeys: String, CodingKey {
            case jobId = "JobId"
            case jobStatus = "JobStatus"
        }
    }

    public struct StopPiiEntitiesDetectionJobRequest: AWSEncodableShape {
        /// The identifier of the PII entities detection job to stop.
        public let jobId: String

        public init(jobId: String) {
            self.jobId = jobId
        }

        public func validate(name: String) throws {
            try self.validate(self.jobId, name: "jobId", parent: name, max: 32)
            try self.validate(self.jobId, name: "jobId", parent: name, min: 1)
            try self.validate(self.jobId, name: "jobId", parent: name, pattern: "^([\\p{L}\\p{Z}\\p{N}_.:/=+\\-%@]*)$")
        }

        private enum CodingKeys: String, CodingKey {
            case jobId = "JobId"
        }
    }

    public struct StopPiiEntitiesDetectionJobResponse: AWSDecodableShape {
        /// The identifier of the PII entities detection job to stop.
        public let jobId: String?
        /// The status of the PII entities detection job.
        public let jobStatus: JobStatus?

        public init(jobId: String? = nil, jobStatus: JobStatus? = nil) {
            self.jobId = jobId
            self.jobStatus = jobStatus
        }

        private enum CodingKeys: String, CodingKey {
            case jobId = "JobId"
            case jobStatus = "JobStatus"
        }
    }

    public struct StopSentimentDetectionJobRequest: AWSEncodableShape {
        /// The identifier of the sentiment detection job to stop.
        public let jobId: String

        public init(jobId: String) {
            self.jobId = jobId
        }

        public func validate(name: String) throws {
            try self.validate(self.jobId, name: "jobId", parent: name, max: 32)
            try self.validate(self.jobId, name: "jobId", parent: name, min: 1)
            try self.validate(self.jobId, name: "jobId", parent: name, pattern: "^([\\p{L}\\p{Z}\\p{N}_.:/=+\\-%@]*)$")
        }

        private enum CodingKeys: String, CodingKey {
            case jobId = "JobId"
        }
    }

    public struct StopSentimentDetectionJobResponse: AWSDecodableShape {
        /// The identifier of the sentiment detection job to stop.
        public let jobId: String?
        /// Either STOP_REQUESTED if the job is currently running, or STOPPED if the job was previously stopped with the StopSentimentDetectionJob operation.
        public let jobStatus: JobStatus?

        public init(jobId: String? = nil, jobStatus: JobStatus? = nil) {
            self.jobId = jobId
            self.jobStatus = jobStatus
        }

        private enum CodingKeys: String, CodingKey {
            case jobId = "JobId"
            case jobStatus = "JobStatus"
        }
    }

    public struct StopTargetedSentimentDetectionJobRequest: AWSEncodableShape {
        /// The identifier of the targeted sentiment detection job to stop.
        public let jobId: String

        public init(jobId: String) {
            self.jobId = jobId
        }

        public func validate(name: String) throws {
            try self.validate(self.jobId, name: "jobId", parent: name, max: 32)
            try self.validate(self.jobId, name: "jobId", parent: name, min: 1)
            try self.validate(self.jobId, name: "jobId", parent: name, pattern: "^([\\p{L}\\p{Z}\\p{N}_.:/=+\\-%@]*)$")
        }

        private enum CodingKeys: String, CodingKey {
            case jobId = "JobId"
        }
    }

    public struct StopTargetedSentimentDetectionJobResponse: AWSDecodableShape {
        /// The identifier of the targeted sentiment detection job to stop.
        public let jobId: String?
        /// Either STOP_REQUESTED if the job is currently running, or STOPPED if the job was previously stopped with the StopSentimentDetectionJob operation.
        public let jobStatus: JobStatus?

        public init(jobId: String? = nil, jobStatus: JobStatus? = nil) {
            self.jobId = jobId
            self.jobStatus = jobStatus
        }

        private enum CodingKeys: String, CodingKey {
            case jobId = "JobId"
            case jobStatus = "JobStatus"
        }
    }

    public struct StopTrainingDocumentClassifierRequest: AWSEncodableShape {
        /// The Amazon Resource Name (ARN) that identifies the document classifier currently being trained.
        public let documentClassifierArn: String

        public init(documentClassifierArn: String) {
            self.documentClassifierArn = documentClassifierArn
        }

        public func validate(name: String) throws {
            try self.validate(self.documentClassifierArn, name: "documentClassifierArn", parent: name, max: 256)
            try self.validate(self.documentClassifierArn, name: "documentClassifierArn", parent: name, pattern: "^arn:aws(-[^:]+)?:comprehend:[a-zA-Z0-9-]*:[0-9]{12}:document-classifier/[a-zA-Z0-9](-*[a-zA-Z0-9])*(/version/[a-zA-Z0-9](-*[a-zA-Z0-9])*)?$")
        }

        private enum CodingKeys: String, CodingKey {
            case documentClassifierArn = "DocumentClassifierArn"
        }
    }

    public struct StopTrainingDocumentClassifierResponse: AWSDecodableShape {
        public init() {}
    }

    public struct StopTrainingEntityRecognizerRequest: AWSEncodableShape {
        /// The Amazon Resource Name (ARN) that identifies the entity recognizer currently being trained.
        public let entityRecognizerArn: String

        public init(entityRecognizerArn: String) {
            self.entityRecognizerArn = entityRecognizerArn
        }

        public func validate(name: String) throws {
            try self.validate(self.entityRecognizerArn, name: "entityRecognizerArn", parent: name, max: 256)
            try self.validate(self.entityRecognizerArn, name: "entityRecognizerArn", parent: name, pattern: "^arn:aws(-[^:]+)?:comprehend:[a-zA-Z0-9-]*:[0-9]{12}:entity-recognizer/[a-zA-Z0-9](-*[a-zA-Z0-9])*(/version/[a-zA-Z0-9](-*[a-zA-Z0-9])*)?$")
        }

        private enum CodingKeys: String, CodingKey {
            case entityRecognizerArn = "EntityRecognizerArn"
        }
    }

    public struct StopTrainingEntityRecognizerResponse: AWSDecodableShape {
        public init() {}
    }

    public struct SyntaxToken: AWSDecodableShape {
        /// The zero-based offset from the beginning of the source text to the first character in the word.
        public let beginOffset: Int?
        /// The zero-based offset from the beginning of the source text to the last character in the word.
        public let endOffset: Int?
        /// Provides the part of speech label and the confidence level that Amazon Comprehend has that the part of speech was correctly identified. For more information, see Syntax in the Comprehend Developer Guide.
        public let partOfSpeech: PartOfSpeechTag?
        /// The word that was recognized in the source text.
        public let text: String?
        /// A unique identifier for a token.
        public let tokenId: Int?

        public init(beginOffset: Int? = nil, endOffset: Int? = nil, partOfSpeech: PartOfSpeechTag? = nil, text: String? = nil, tokenId: Int? = nil) {
            self.beginOffset = beginOffset
            self.endOffset = endOffset
            self.partOfSpeech = partOfSpeech
            self.text = text
            self.tokenId = tokenId
        }

        private enum CodingKeys: String, CodingKey {
            case beginOffset = "BeginOffset"
            case endOffset = "EndOffset"
            case partOfSpeech = "PartOfSpeech"
            case text = "Text"
            case tokenId = "TokenId"
        }
    }

    public struct Tag: AWSEncodableShape & AWSDecodableShape {
        /// The initial part of a key-value pair that forms a tag associated with a given resource. For instance, if you want to show which resources are used by which departments, you might use “Department” as the key portion of the pair, with multiple possible values such as “sales,” “legal,” and “administration.”
        public let key: String
        ///  The second part of a key-value pair that forms a tag associated with a given resource. For instance, if you want to show which resources are used by which departments, you might use “Department” as the initial (key) portion of the pair, with a value of “sales” to indicate the sales department.
        public let value: String?

        public init(key: String, value: String? = nil) {
            self.key = key
            self.value = value
        }

        public func validate(name: String) throws {
            try self.validate(self.key, name: "key", parent: name, max: 128)
            try self.validate(self.key, name: "key", parent: name, min: 1)
            try self.validate(self.value, name: "value", parent: name, max: 256)
        }

        private enum CodingKeys: String, CodingKey {
            case key = "Key"
            case value = "Value"
        }
    }

    public struct TagResourceRequest: AWSEncodableShape {
        /// The Amazon Resource Name (ARN) of the given Amazon Comprehend resource to which you want to associate the tags.
        public let resourceArn: String
        /// Tags being associated with a specific Amazon Comprehend resource. There can be a maximum of 50 tags (both existing and pending) associated with a specific resource.
        public let tags: [Tag]

        public init(resourceArn: String, tags: [Tag]) {
            self.resourceArn = resourceArn
            self.tags = tags
        }

        public func validate(name: String) throws {
            try self.validate(self.resourceArn, name: "resourceArn", parent: name, max: 256)
            try self.validate(self.resourceArn, name: "resourceArn", parent: name, pattern: "^arn:aws(-[^:]+)?:comprehend:[a-zA-Z0-9-]*:[0-9]{12}:[a-zA-Z0-9-]{1,64}/[a-zA-Z0-9](-*[a-zA-Z0-9])*(/version/[a-zA-Z0-9](-*[a-zA-Z0-9])*)?$")
            try self.tags.forEach {
                try $0.validate(name: "\(name).tags[]")
            }
        }

        private enum CodingKeys: String, CodingKey {
            case resourceArn = "ResourceArn"
            case tags = "Tags"
        }
    }

    public struct TagResourceResponse: AWSDecodableShape {
        public init() {}
    }

    public struct TargetedSentimentDetectionJobFilter: AWSEncodableShape {
        /// Filters on the name of the job.
        public let jobName: String?
        /// Filters the list of jobs based on job status. Returns only jobs with the specified status.
        public let jobStatus: JobStatus?
        /// Filters the list of jobs based on the time that the job was submitted for processing. Returns only jobs submitted after the specified time. Jobs are returned in descending order, newest to oldest.
        public let submitTimeAfter: Date?
        /// Filters the list of jobs based on the time that the job was submitted for processing. Returns only jobs submitted before the specified time. Jobs are returned in ascending order, oldest to newest.
        public let submitTimeBefore: Date?

        public init(jobName: String? = nil, jobStatus: JobStatus? = nil, submitTimeAfter: Date? = nil, submitTimeBefore: Date? = nil) {
            self.jobName = jobName
            self.jobStatus = jobStatus
            self.submitTimeAfter = submitTimeAfter
            self.submitTimeBefore = submitTimeBefore
        }

        public func validate(name: String) throws {
            try self.validate(self.jobName, name: "jobName", parent: name, max: 256)
            try self.validate(self.jobName, name: "jobName", parent: name, min: 1)
            try self.validate(self.jobName, name: "jobName", parent: name, pattern: "^([\\p{L}\\p{Z}\\p{N}_.:/=+\\-%@]*)$")
        }

        private enum CodingKeys: String, CodingKey {
            case jobName = "JobName"
            case jobStatus = "JobStatus"
            case submitTimeAfter = "SubmitTimeAfter"
            case submitTimeBefore = "SubmitTimeBefore"
        }
    }

    public struct TargetedSentimentDetectionJobProperties: AWSDecodableShape {
        /// The Amazon Resource Name (ARN) that gives Amazon Comprehend read access to your input data.
        public let dataAccessRoleArn: String?
        /// The time that the targeted sentiment detection job ended.
        public let endTime: Date?
        public let inputDataConfig: InputDataConfig?
        /// The Amazon Resource Name (ARN) of the targeted sentiment detection job. It is a unique, fully qualified identifier for the job. It includes the AWS account, Region, and the job ID. The format of the ARN is as follows:  arn::comprehend:::targeted-sentiment-detection-job/  The following is an example job ARN:  arn:aws:comprehend:us-west-2:111122223333:targeted-sentiment-detection-job/1234abcd12ab34cd56ef1234567890ab
        public let jobArn: String?
        /// The identifier assigned to the targeted sentiment detection job.
        public let jobId: String?
        /// The name that you assigned to the targeted sentiment detection job.
        public let jobName: String?
        /// The current status of the targeted sentiment detection job. If the status is FAILED, the Messages field shows the reason for the failure.
        public let jobStatus: JobStatus?
        /// The language code of the input documents.
        public let languageCode: LanguageCode?
        /// A description of the status of a job.
        public let message: String?
        public let outputDataConfig: OutputDataConfig?
        /// The time that the targeted sentiment detection job was submitted for processing.
        public let submitTime: Date?
        /// ID for the AWS Key Management Service (KMS) key that Amazon Comprehend uses to encrypt data on the storage volume attached to the ML compute instance(s) that process the targeted sentiment detection job. The VolumeKmsKeyId can be either of the following formats:   KMS Key ID: "1234abcd-12ab-34cd-56ef-1234567890ab"    Amazon Resource Name (ARN) of a KMS Key: "arn:aws:kms:us-west-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab"
        public let volumeKmsKeyId: String?
        public let vpcConfig: VpcConfig?

        public init(dataAccessRoleArn: String? = nil, endTime: Date? = nil, inputDataConfig: InputDataConfig? = nil, jobArn: String? = nil, jobId: String? = nil, jobName: String? = nil, jobStatus: JobStatus? = nil, languageCode: LanguageCode? = nil, message: String? = nil, outputDataConfig: OutputDataConfig? = nil, submitTime: Date? = nil, volumeKmsKeyId: String? = nil, vpcConfig: VpcConfig? = nil) {
            self.dataAccessRoleArn = dataAccessRoleArn
            self.endTime = endTime
            self.inputDataConfig = inputDataConfig
            self.jobArn = jobArn
            self.jobId = jobId
            self.jobName = jobName
            self.jobStatus = jobStatus
            self.languageCode = languageCode
            self.message = message
            self.outputDataConfig = outputDataConfig
            self.submitTime = submitTime
            self.volumeKmsKeyId = volumeKmsKeyId
            self.vpcConfig = vpcConfig
        }

        private enum CodingKeys: String, CodingKey {
            case dataAccessRoleArn = "DataAccessRoleArn"
            case endTime = "EndTime"
            case inputDataConfig = "InputDataConfig"
            case jobArn = "JobArn"
            case jobId = "JobId"
            case jobName = "JobName"
            case jobStatus = "JobStatus"
            case languageCode = "LanguageCode"
            case message = "Message"
            case outputDataConfig = "OutputDataConfig"
            case submitTime = "SubmitTime"
            case volumeKmsKeyId = "VolumeKmsKeyId"
            case vpcConfig = "VpcConfig"
        }
    }

    public struct TargetedSentimentEntity: AWSDecodableShape {
        /// One or more index into the Mentions array that provides the best name for the entity group.
        public let descriptiveMentionIndex: [Int]?
        /// An array of mentions of the entity in the document. The array represents a co-reference group. See  Co-reference group for an example.
        public let mentions: [TargetedSentimentMention]?

        public init(descriptiveMentionIndex: [Int]? = nil, mentions: [TargetedSentimentMention]? = nil) {
            self.descriptiveMentionIndex = descriptiveMentionIndex
            self.mentions = mentions
        }

        private enum CodingKeys: String, CodingKey {
            case descriptiveMentionIndex = "DescriptiveMentionIndex"
            case mentions = "Mentions"
        }
    }

    public struct TargetedSentimentMention: AWSDecodableShape {
        /// The offset into the document text where the mention begins.
        public let beginOffset: Int?
        /// The offset into the document text where the mention ends.
        public let endOffset: Int?
        /// The confidence that all the entities mentioned in the group relate to the same entity.
        public let groupScore: Float?
        /// Contains the sentiment and sentiment score for the mention.
        public let mentionSentiment: MentionSentiment?
        /// Model confidence that the entity is relevant. Value range is zero to one, where one is highest confidence.
        public let score: Float?
        /// The text in the document that identifies the entity.
        public let text: String?
        /// The type of the entity. Amazon Comprehend supports a variety of entity types.
        public let type: TargetedSentimentEntityType?

        public init(beginOffset: Int? = nil, endOffset: Int? = nil, groupScore: Float? = nil, mentionSentiment: MentionSentiment? = nil, score: Float? = nil, text: String? = nil, type: TargetedSentimentEntityType? = nil) {
            self.beginOffset = beginOffset
            self.endOffset = endOffset
            self.groupScore = groupScore
            self.mentionSentiment = mentionSentiment
            self.score = score
            self.text = text
            self.type = type
        }

        private enum CodingKeys: String, CodingKey {
            case beginOffset = "BeginOffset"
            case endOffset = "EndOffset"
            case groupScore = "GroupScore"
            case mentionSentiment = "MentionSentiment"
            case score = "Score"
            case text = "Text"
            case type = "Type"
        }
    }

    public struct TopicsDetectionJobFilter: AWSEncodableShape {
        public let jobName: String?
        /// Filters the list of topic detection jobs based on job status. Returns only jobs with the specified status.
        public let jobStatus: JobStatus?
        /// Filters the list of jobs based on the time that the job was submitted for processing. Only returns jobs submitted after the specified time. Jobs are returned in ascending order, oldest to newest.
        public let submitTimeAfter: Date?
        /// Filters the list of jobs based on the time that the job was submitted for processing. Only returns jobs submitted before the specified time. Jobs are returned in descending order, newest to oldest.
        public let submitTimeBefore: Date?

        public init(jobName: String? = nil, jobStatus: JobStatus? = nil, submitTimeAfter: Date? = nil, submitTimeBefore: Date? = nil) {
            self.jobName = jobName
            self.jobStatus = jobStatus
            self.submitTimeAfter = submitTimeAfter
            self.submitTimeBefore = submitTimeBefore
        }

        public func validate(name: String) throws {
            try self.validate(self.jobName, name: "jobName", parent: name, max: 256)
            try self.validate(self.jobName, name: "jobName", parent: name, min: 1)
            try self.validate(self.jobName, name: "jobName", parent: name, pattern: "^([\\p{L}\\p{Z}\\p{N}_.:/=+\\-%@]*)$")
        }

        private enum CodingKeys: String, CodingKey {
            case jobName = "JobName"
            case jobStatus = "JobStatus"
            case submitTimeAfter = "SubmitTimeAfter"
            case submitTimeBefore = "SubmitTimeBefore"
        }
    }

    public struct TopicsDetectionJobProperties: AWSDecodableShape {
        /// The Amazon Resource Name (ARN) of the AWS Identity and Management (IAM) role that grants Amazon Comprehend read access to your job data.
        public let dataAccessRoleArn: String?
        /// The time that the topic detection job was completed.
        public let endTime: Date?
        /// The input data configuration supplied when you created the topic detection job.
        public let inputDataConfig: InputDataConfig?
        /// The Amazon Resource Name (ARN) of the topics detection job. It is a unique, fully qualified identifier for the job. It includes the AWS account, Region, and the job ID. The format of the ARN is as follows:  arn::comprehend:::topics-detection-job/  The following is an example job ARN:  arn:aws:comprehend:us-west-2:111122223333:topics-detection-job/1234abcd12ab34cd56ef1234567890ab
        public let jobArn: String?
        /// The identifier assigned to the topic detection job.
        public let jobId: String?
        /// The name of the topic detection job.
        public let jobName: String?
        /// The current status of the topic detection job. If the status is Failed, the reason for the failure is shown in the Message field.
        public let jobStatus: JobStatus?
        /// A description for the status of a job.
        public let message: String?
        /// The number of topics to detect supplied when you created the topic detection job. The default is 10.
        public let numberOfTopics: Int?
        /// The output data configuration supplied when you created the topic detection job.
        public let outputDataConfig: OutputDataConfig?
        /// The time that the topic detection job was submitted for processing.
        public let submitTime: Date?
        /// ID for the AWS Key Management Service (KMS) key that Amazon Comprehend uses to encrypt data on the storage volume attached to the ML compute instance(s) that process the analysis job. The VolumeKmsKeyId can be either of the following formats:   KMS Key ID: "1234abcd-12ab-34cd-56ef-1234567890ab"    Amazon Resource Name (ARN) of a KMS Key: "arn:aws:kms:us-west-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab"
        public let volumeKmsKeyId: String?
        /// Configuration parameters for a private Virtual Private Cloud (VPC) containing the resources you are using for your topic detection job. For more information, see Amazon VPC.
        public let vpcConfig: VpcConfig?

        public init(dataAccessRoleArn: String? = nil, endTime: Date? = nil, inputDataConfig: InputDataConfig? = nil, jobArn: String? = nil, jobId: String? = nil, jobName: String? = nil, jobStatus: JobStatus? = nil, message: String? = nil, numberOfTopics: Int? = nil, outputDataConfig: OutputDataConfig? = nil, submitTime: Date? = nil, volumeKmsKeyId: String? = nil, vpcConfig: VpcConfig? = nil) {
            self.dataAccessRoleArn = dataAccessRoleArn
            self.endTime = endTime
            self.inputDataConfig = inputDataConfig
            self.jobArn = jobArn
            self.jobId = jobId
            self.jobName = jobName
            self.jobStatus = jobStatus
            self.message = message
            self.numberOfTopics = numberOfTopics
            self.outputDataConfig = outputDataConfig
            self.submitTime = submitTime
            self.volumeKmsKeyId = volumeKmsKeyId
            self.vpcConfig = vpcConfig
        }

        private enum CodingKeys: String, CodingKey {
            case dataAccessRoleArn = "DataAccessRoleArn"
            case endTime = "EndTime"
            case inputDataConfig = "InputDataConfig"
            case jobArn = "JobArn"
            case jobId = "JobId"
            case jobName = "JobName"
            case jobStatus = "JobStatus"
            case message = "Message"
            case numberOfTopics = "NumberOfTopics"
            case outputDataConfig = "OutputDataConfig"
            case submitTime = "SubmitTime"
            case volumeKmsKeyId = "VolumeKmsKeyId"
            case vpcConfig = "VpcConfig"
        }
    }

    public struct UntagResourceRequest: AWSEncodableShape {
        ///  The Amazon Resource Name (ARN) of the given Amazon Comprehend resource from which you want to remove the tags.
        public let resourceArn: String
        /// The initial part of a key-value pair that forms a tag being removed from a given resource. For example, a tag with "Sales" as the key might be added to a resource to indicate its use by the sales department. Keys must be unique and cannot be duplicated for a particular resource.
        public let tagKeys: [String]

        public init(resourceArn: String, tagKeys: [String]) {
            self.resourceArn = resourceArn
            self.tagKeys = tagKeys
        }

        public func validate(name: String) throws {
            try self.validate(self.resourceArn, name: "resourceArn", parent: name, max: 256)
            try self.validate(self.resourceArn, name: "resourceArn", parent: name, pattern: "^arn:aws(-[^:]+)?:comprehend:[a-zA-Z0-9-]*:[0-9]{12}:[a-zA-Z0-9-]{1,64}/[a-zA-Z0-9](-*[a-zA-Z0-9])*(/version/[a-zA-Z0-9](-*[a-zA-Z0-9])*)?$")
            try self.tagKeys.forEach {
                try validate($0, name: "tagKeys[]", parent: name, max: 128)
                try validate($0, name: "tagKeys[]", parent: name, min: 1)
            }
        }

        private enum CodingKeys: String, CodingKey {
            case resourceArn = "ResourceArn"
            case tagKeys = "TagKeys"
        }
    }

    public struct UntagResourceResponse: AWSDecodableShape {
        public init() {}
    }

    public struct UpdateEndpointRequest: AWSEncodableShape {
        /// Data access role ARN to use in case the new model is encrypted with a customer CMK.
        public let desiredDataAccessRoleArn: String?
        ///  The desired number of inference units to be used by the model using this endpoint.  Each inference unit represents of a throughput of 100 characters per second.
        public let desiredInferenceUnits: Int?
        /// The ARN of the new model to use when updating an existing endpoint.
        public let desiredModelArn: String?
        /// The Amazon Resource Number (ARN) of the endpoint being updated.
        public let endpointArn: String

        public init(desiredDataAccessRoleArn: String? = nil, desiredInferenceUnits: Int? = nil, desiredModelArn: String? = nil, endpointArn: String) {
            self.desiredDataAccessRoleArn = desiredDataAccessRoleArn
            self.desiredInferenceUnits = desiredInferenceUnits
            self.desiredModelArn = desiredModelArn
            self.endpointArn = endpointArn
        }

        public func validate(name: String) throws {
            try self.validate(self.desiredDataAccessRoleArn, name: "desiredDataAccessRoleArn", parent: name, max: 2048)
            try self.validate(self.desiredDataAccessRoleArn, name: "desiredDataAccessRoleArn", parent: name, min: 20)
            try self.validate(self.desiredDataAccessRoleArn, name: "desiredDataAccessRoleArn", parent: name, pattern: "^arn:aws(-[^:]+)?:iam::[0-9]{12}:role/.+$")
            try self.validate(self.desiredInferenceUnits, name: "desiredInferenceUnits", parent: name, min: 1)
            try self.validate(self.desiredModelArn, name: "desiredModelArn", parent: name, max: 256)
            try self.validate(self.desiredModelArn, name: "desiredModelArn", parent: name, pattern: "^arn:aws(-[^:]+)?:comprehend:[a-zA-Z0-9-]*:[0-9]{12}:(document-classifier|entity-recognizer)/[a-zA-Z0-9](-*[a-zA-Z0-9])*(/version/[a-zA-Z0-9](-*[a-zA-Z0-9])*)?$")
            try self.validate(self.endpointArn, name: "endpointArn", parent: name, max: 256)
            try self.validate(self.endpointArn, name: "endpointArn", parent: name, pattern: "^arn:aws(-[^:]+)?:comprehend:[a-zA-Z0-9-]*:[0-9]{12}:(document-classifier-endpoint|entity-recognizer-endpoint)/[a-zA-Z0-9](-*[a-zA-Z0-9])*$")
        }

        private enum CodingKeys: String, CodingKey {
            case desiredDataAccessRoleArn = "DesiredDataAccessRoleArn"
            case desiredInferenceUnits = "DesiredInferenceUnits"
            case desiredModelArn = "DesiredModelArn"
            case endpointArn = "EndpointArn"
        }
    }

    public struct UpdateEndpointResponse: AWSDecodableShape {
        public init() {}
    }

    public struct VpcConfig: AWSEncodableShape & AWSDecodableShape {
        /// The ID number for a security group on an instance of your private VPC. Security groups on your VPC function serve as a virtual firewall to control inbound and outbound traffic and provides security for the resources that you’ll be accessing on the VPC. This ID number is preceded by "sg-", for instance: "sg-03b388029b0a285ea". For more information, see Security Groups for your VPC.
        public let securityGroupIds: [String]
        /// The ID for each subnet being used in your private VPC. This subnet is a subset of the a range of IPv4 addresses used by the VPC and is specific to a given availability zone in the VPC’s region. This ID number is preceded by "subnet-", for instance: "subnet-04ccf456919e69055". For more information, see VPCs and Subnets.
        public let subnets: [String]

        public init(securityGroupIds: [String], subnets: [String]) {
            self.securityGroupIds = securityGroupIds
            self.subnets = subnets
        }

        public func validate(name: String) throws {
            try self.securityGroupIds.forEach {
                try validate($0, name: "securityGroupIds[]", parent: name, max: 32)
                try validate($0, name: "securityGroupIds[]", parent: name, min: 1)
                try validate($0, name: "securityGroupIds[]", parent: name, pattern: "^[-0-9a-zA-Z]+$")
            }
            try self.validate(self.securityGroupIds, name: "securityGroupIds", parent: name, max: 5)
            try self.validate(self.securityGroupIds, name: "securityGroupIds", parent: name, min: 1)
            try self.subnets.forEach {
                try validate($0, name: "subnets[]", parent: name, max: 32)
                try validate($0, name: "subnets[]", parent: name, min: 1)
                try validate($0, name: "subnets[]", parent: name, pattern: "^[-0-9a-zA-Z]+$")
            }
            try self.validate(self.subnets, name: "subnets", parent: name, max: 16)
            try self.validate(self.subnets, name: "subnets", parent: name, min: 1)
        }

        private enum CodingKeys: String, CodingKey {
            case securityGroupIds = "SecurityGroupIds"
            case subnets = "Subnets"
        }
    }
}

// MARK: - Errors

/// Error enum for Comprehend
public struct ComprehendErrorType: AWSErrorType {
    enum Code: String {
        case batchSizeLimitExceededException = "BatchSizeLimitExceededException"
        case concurrentModificationException = "ConcurrentModificationException"
        case internalServerException = "InternalServerException"
        case invalidFilterException = "InvalidFilterException"
        case invalidRequestException = "InvalidRequestException"
        case jobNotFoundException = "JobNotFoundException"
        case kmsKeyValidationException = "KmsKeyValidationException"
        case resourceInUseException = "ResourceInUseException"
        case resourceLimitExceededException = "ResourceLimitExceededException"
        case resourceNotFoundException = "ResourceNotFoundException"
        case resourceUnavailableException = "ResourceUnavailableException"
        case textSizeLimitExceededException = "TextSizeLimitExceededException"
        case tooManyRequestsException = "TooManyRequestsException"
        case tooManyTagKeysException = "TooManyTagKeysException"
        case tooManyTagsException = "TooManyTagsException"
        case unsupportedLanguageException = "UnsupportedLanguageException"
    }

    private let error: Code
    public let context: AWSErrorContext?

    /// initialize Comprehend
    public init?(errorCode: String, context: AWSErrorContext) {
        guard let error = Code(rawValue: errorCode) else { return nil }
        self.error = error
        self.context = context
    }

    internal init(_ error: Code) {
        self.error = error
        self.context = nil
    }

    /// return error code string
    public var errorCode: String { self.error.rawValue }

    /// The number of documents in the request exceeds the limit of 25. Try your request again with fewer documents.
    public static var batchSizeLimitExceededException: Self { .init(.batchSizeLimitExceededException) }
    /// Concurrent modification of the tags associated with an Amazon Comprehend resource is not supported.
    public static var concurrentModificationException: Self { .init(.concurrentModificationException) }
    /// An internal server error occurred. Retry your request.
    public static var internalServerException: Self { .init(.internalServerException) }
    /// The filter specified for the operation is invalid. Specify a different filter.
    public static var invalidFilterException: Self { .init(.invalidFilterException) }
    /// The request is invalid.
    public static var invalidRequestException: Self { .init(.invalidRequestException) }
    /// The specified job was not found. Check the job ID and try again.
    public static var jobNotFoundException: Self { .init(.jobNotFoundException) }
    /// The KMS customer managed key (CMK) entered cannot be validated. Verify the key and re-enter it.
    public static var kmsKeyValidationException: Self { .init(.kmsKeyValidationException) }
    /// The specified resource name is already in use. Use a different name and try your request again.
    public static var resourceInUseException: Self { .init(.resourceInUseException) }
    /// The maximum number of resources per account has been exceeded. Review the resources, and then try your request again.
    public static var resourceLimitExceededException: Self { .init(.resourceLimitExceededException) }
    /// The specified resource ARN was not found. Check the ARN and try your request again.
    public static var resourceNotFoundException: Self { .init(.resourceNotFoundException) }
    /// The specified resource is not available. Check the resource and try your request again.
    public static var resourceUnavailableException: Self { .init(.resourceUnavailableException) }
    /// The size of the input text exceeds the limit. Use a smaller document.
    public static var textSizeLimitExceededException: Self { .init(.textSizeLimitExceededException) }
    /// The number of requests exceeds the limit. Resubmit your request later.
    public static var tooManyRequestsException: Self { .init(.tooManyRequestsException) }
    /// The request contains more tag keys than can be associated with a resource (50 tag keys per resource).
    public static var tooManyTagKeysException: Self { .init(.tooManyTagKeysException) }
    /// The request contains more tags than can be associated with a resource (50 tags per resource). The maximum number of tags includes both existing tags and those included in your current request.
    public static var tooManyTagsException: Self { .init(.tooManyTagsException) }
    /// Amazon Comprehend can&#39;t process the language of the input text. For custom entity recognition APIs, only English, Spanish, French, Italian, German, or Portuguese are accepted. For a list of supported languages, Supported languages in the Comprehend Developer Guide.
    public static var unsupportedLanguageException: Self { .init(.unsupportedLanguageException) }
}

extension ComprehendErrorType: Equatable {
    public static func == (lhs: ComprehendErrorType, rhs: ComprehendErrorType) -> Bool {
        lhs.error == rhs.error
    }
}

extension ComprehendErrorType: CustomStringConvertible {
    public var description: String {
        return "\(self.error.rawValue): \(self.message ?? "")"
    }
}
